chore: add semantic-release workflow and configuration
Some checks failed
Release / release (push) Failing after 41s

Added GitHub Actions workflow for automatic versioning and releases using semantic-release with Angular commit convention.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Bastian de Byl
2025-10-03 11:11:16 -04:00
parent 043da741fa
commit 8bcd564447
3 changed files with 78 additions and 0 deletions

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

@@ -0,0 +1,38 @@
name: Release
on:
push:
branches: [main]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install semantic-release
run: |
npm install -g semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/release-notes-generator \
@semantic-release/changelog \
@semantic-release/github \
@semantic-release/git
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
*.json
!.releaserc.json
*.sum
config/*

39
.releaserc.json Normal file
View File

@@ -0,0 +1,39 @@
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{"message": "*#patch*", "release": "patch"},
{"message": "*#minor*", "release": "minor"},
{"message": "*#major*", "release": "major"},
{"type": "fix", "release": "patch"},
{"type": "feat", "release": "minor"},
{"type": "perf", "release": "patch"}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "angular"
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}