-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): configure semantic release workflow
Resolves #11 by implementing a workflow for the release procedure using semantic release to automate versioning and changelog generation. - Added `semantic-release` configuration for automating releases. - Configured `semantic-release-monorepo` for monorepo support. - Updated GitHub Actions workflow with a release task. - Ensured the release process skips packages with no changes to prevent unnecessary releases.
- Loading branch information
Showing
9 changed files
with
11,357 additions
and
5,809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
packages: write | ||
issues: write | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
always-auth: true | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@srgssr' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
env : | ||
CI: true | ||
run: | | ||
npm pkg delete scripts.prepare | ||
npm ci | ||
- name: Run build | ||
run: | | ||
npm run build -ws | ||
- name: Release 📦 | ||
if: success() | ||
run: npm run release:ci -ws | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"branches": ["main"], | ||
"extends": "semantic-release-monorepo", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES", | ||
"BREAKING" | ||
] | ||
}, | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "breaking", | ||
"section": "Breaking Changes ❗", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "feat", | ||
"section": "New Features 🚀", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Enhancements and Bug Fixes 🐛", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Docs 📖", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "Styles 🎨", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Refactor 🔩", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performances ⚡️", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests ✅", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "CI 🔁", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chore 🧹", | ||
"hidden": false | ||
} | ||
] | ||
}, | ||
"writerOpts": { | ||
"groupBy": "type", | ||
"commitGroupsSort": [ | ||
"breaking", | ||
"feat", | ||
"fix" | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"package-lock.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [ | ||
{ | ||
"path": "dist/**/*" | ||
} | ||
] | ||
} | ||
] | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"branches": ["main"], | ||
"extends": "semantic-release-monorepo", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES", | ||
"BREAKING" | ||
] | ||
}, | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "breaking", | ||
"section": "Breaking Changes ❗", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "feat", | ||
"section": "New Features 🚀", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Enhancements and Bug Fixes 🐛", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Docs 📖", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "Styles 🎨", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Refactor 🔩", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performances ⚡️", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests ✅", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "CI 🔁", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chore 🧹", | ||
"hidden": false | ||
} | ||
] | ||
}, | ||
"writerOpts": { | ||
"groupBy": "type", | ||
"commitGroupsSort": [ | ||
"breaking", | ||
"feat", | ||
"fix" | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"package-lock.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [ | ||
{ | ||
"path": "dist/**/*" | ||
} | ||
] | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.