Skip to content

Commit

Permalink
fix: add semantic-release-telegram plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Feb 6, 2024
1 parent 2d1135f commit c2da384
Show file tree
Hide file tree
Showing 5 changed files with 1,033 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
# This github token must allow to push to this GitHub repository.
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
TELEGRAM_BOT_ID: ${{ secrets.TELEGRAM_BOT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ fromJSON(secrets.TELEGRAM).chat_id }}
run: npx semantic-release --ci

macos-build-test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ const preset = 'conventionalcommits'
const presetConfig = {
types: [
{ type: 'chore', hidden: true },
{ type: 'feat', section: 'Features' },
{ type: 'docs', hidden: true },
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'perf', hidden: true, section: 'Performance Improvements' },
{ type: 'perf', hidden: true },
{ type: 'refactor', hidden: true },
{ type: 'style', hidden: true },
{ type: 'test', hidden: true }
Expand All @@ -99,8 +99,8 @@ const commit_analyzer = [
// https://github.com/semantic-release/commit-analyzer#releaserules
releaseRules: [
{ type: 'docs', release: 'patch' },
// Maybe a refactor should trigger a release. I am not 100% convinced though.
{ type: 'refactor', release: 'patch' }
{ type: 'refactor', release: 'patch' },
{ scope: 'no-release', release: false }
]
}
]
Expand All @@ -122,11 +122,20 @@ const release_notes_generator = [
}
]

// https://github.com/pustovitDmytro/semantic-release-telegram
const telegram = [
'semantic-release-telegram',
{
chats: [process.env.TELEGRAM_CHAT_ID]
}
]

module.exports = {
changelog,
commit_analyzer,
git,
github,
npm,
release_notes_generator
release_notes_generator,
telegram
}

0 comments on commit c2da384

Please sign in to comment.