feat: auto-release based on conventional-commits to semantic-versioning

This commit is contained in:
genofire 2023-09-17 00:13:37 +02:00
parent 5a8383ed30
commit 34e976a7aa
6 changed files with 6808 additions and 0 deletions

40
.github/workflows/release.yml vendored Normal file
View File

@ -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

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ webroot
/bin /bin
coverage.html coverage.html
coverage.out coverage.out
/node_modules

0
.gitmodules vendored
View File

28
.releaserc Normal file
View File

@ -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",
{}
]
]
}

6731
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

7
package.json Normal file
View File

@ -0,0 +1,7 @@
{
"devDependencies": {
"@semantic-release/git": "^10.0.1",
"conventional-changelog-conventionalcommits": "^7.0.2",
"semantic-release": "^22.0.0"
}
}