feat: auto-release based on conventional-commits to semantic-versioning
This commit is contained in:
parent
5a8383ed30
commit
34e976a7aa
|
@ -0,0 +1,40 @@
|
|||
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- rc
|
||||
|
||||
permissions:
|
||||
contents: read # for checkout
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # to be able to publish a GitHub release
|
||||
issues: write # to be able to comment on released issues
|
||||
pull-requests: write # to be able to comment on released pull requests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm clean-install
|
||||
|
||||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
|
||||
run: npm audit signatures
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx semantic-release
|
|
@ -28,3 +28,5 @@ webroot
|
|||
/bin
|
||||
coverage.html
|
||||
coverage.out
|
||||
|
||||
/node_modules
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"branches": [
|
||||
{ "name": "main" },
|
||||
{ "name": "rc", "prerelease": true }
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"@semantic-release/commit-analyzer",
|
||||
{
|
||||
"preset": "conventionalcommits"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/release-notes-generator",
|
||||
{
|
||||
"preset": "conventionalcommits"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{}
|
||||
]
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"conventional-changelog-conventionalcommits": "^7.0.2",
|
||||
"semantic-release": "^22.0.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue