From 8bcd564447144d4a2ffe5685d4e97694d0098297 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Fri, 3 Oct 2025 11:11:16 -0400 Subject: [PATCH] chore: add semantic-release workflow and configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/release.yml | 38 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + .releaserc.json | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .releaserc.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8a53f25 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index b593205..aeaea39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.json +!.releaserc.json *.sum config/* \ No newline at end of file diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..2fb947b --- /dev/null +++ b/.releaserc.json @@ -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}" + } + ] + ] +} \ No newline at end of file