Skip to content

Commit b085cc8

Browse files
committed
ci: commit version bump directly via @semantic-release/git
Replace the bespoke bump-version action + PR flow with the standard @semantic-release/git plugin. semantic-release now commits the version bump (package.json, package-lock.json, app/manifest.json, CHANGELOG.md) straight to master as part of the release job, eliminating the housekeeping PR that had to be reviewed and merged manually after every release. - Add @semantic-release/git to .releaserc.json (dependency was already declared in devDependencies at ^10.0.1) - Remove the 'Bump Version' step and pull-requests write permission from the release workflow - Delete the now-unreachable .github/actions/bump-version action
1 parent dde2ca3 commit b085cc8

4 files changed

Lines changed: 16 additions & 50 deletions

File tree

.github/actions/bump-version/action.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/actions/bump-version/index.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
14-
pull-requests: write
1514
steps:
1615
- uses: actions/checkout@v6
1716
- name: Setup Node.js
@@ -22,12 +21,11 @@ jobs:
2221
run: npm ci
2322
- name: Run tests
2423
run: grunt test
25-
# Release using semantic-relaease if there are new smenatic commits
24+
# Release using semantic-release if there are new semantic commits.
25+
# The @semantic-release/git plugin commits the version bump
26+
# (package.json, package-lock.json, app/manifest.json, CHANGELOG.md)
27+
# directly back to master.
2628
- name: Release
2729
env:
2830
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2931
run: npx semantic-release
30-
- name: Bump Version
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
uses: ./.github/actions/bump-version

.releaserc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
"prepareCmd": "node ./scripts/update-version.js ${nextRelease.version} && npm i"
1010
}
1111
],
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": [
16+
"package.json",
17+
"package-lock.json",
18+
"app/manifest.json",
19+
"CHANGELOG.md"
20+
],
21+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
22+
}
23+
],
1224
[
1325
"@semantic-release/github",
1426
{

0 commit comments

Comments
 (0)