From b085cc8c2d9eba02682f79d51ad59521bd098a65 Mon Sep 17 00:00:00 2001 From: Konstantin Gogov Date: Fri, 14 Aug 2026 16:52:33 +0300 Subject: [PATCH 1/3] 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 --- .github/actions/bump-version/action.yml | 5 ---- .github/actions/bump-version/index.js | 39 ------------------------- .github/workflows/release.yml | 10 +++---- .releaserc.json | 12 ++++++++ 4 files changed, 16 insertions(+), 50 deletions(-) delete mode 100644 .github/actions/bump-version/action.yml delete mode 100644 .github/actions/bump-version/index.js diff --git a/.github/actions/bump-version/action.yml b/.github/actions/bump-version/action.yml deleted file mode 100644 index 8936004c..00000000 --- a/.github/actions/bump-version/action.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Bump version' -description: 'Bump version in files' -runs: - using: 'node20' - main: 'index.js' diff --git a/.github/actions/bump-version/index.js b/.github/actions/bump-version/index.js deleted file mode 100644 index 044a2b08..00000000 --- a/.github/actions/bump-version/index.js +++ /dev/null @@ -1,39 +0,0 @@ -const path = require('path'); -const core = require('@actions/core'); -const github = require('@actions/github'); -const exec = require('@actions/exec'); - -const run = async () => { - core.info('Setup octokit'); - const octokit = github.getOctokit(process.env.GITHUB_TOKEN); - const { owner, repo } = github.context.repo; - - core.info('Fetch latest release info'); - const latestRelease = await octokit.rest.repos.getLatestRelease({ - owner, - repo, - }); - - core.info('Set variables'); - const version = latestRelease.data.tag_name.slice(1); - - core.info('Update files version field'); - await exec.exec('node', [path.join(process.env.GITHUB_WORKSPACE, './scripts/update-version.js'), version]); - - await exec.exec('git', ['config', '--global', 'user.name', 'github-actions[bot]']); - await exec.exec('git', ['config', '--global', 'user.email', '41898282+github-actions[bot]@users.noreply.github.com']); - - const branch = `bump-version-${version}`; - - // Delete the remote branch if it already exists (e.g. from a previous run) - await exec.exec('git', ['push', 'origin', '--delete', branch]).catch(() => {}); - - await exec.exec('git', ['checkout', '-B', branch]); - await exec.exec('git', ['commit', '-am', `chore: release ${version}`]); - await exec.exec('git', ['push', '-u', 'origin', branch]); - await exec.exec('gh', ['pr', 'create', '--fill']); -}; - -run() - .then(() => core.info('Updated files version successfully')) - .catch(error => core.setFailed(error.message)); diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a156886..6397c835 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pull-requests: write steps: - uses: actions/checkout@v6 - name: Setup Node.js @@ -22,12 +21,11 @@ jobs: run: npm ci - name: Run tests run: grunt test - # Release using semantic-relaease if there are new smenatic commits + # Release using semantic-release if there are new semantic commits. + # The @semantic-release/git plugin commits the version bump + # (package.json, package-lock.json, app/manifest.json, CHANGELOG.md) + # directly back to master. - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npx semantic-release - - name: Bump Version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/bump-version diff --git a/.releaserc.json b/.releaserc.json index f14f306e..8868d05d 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -9,6 +9,18 @@ "prepareCmd": "node ./scripts/update-version.js ${nextRelease.version} && npm i" } ], + [ + "@semantic-release/git", + { + "assets": [ + "package.json", + "package-lock.json", + "app/manifest.json", + "CHANGELOG.md" + ], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ], [ "@semantic-release/github", { From fa1e6093e49733d99f118e1aa25a6420270705eb Mon Sep 17 00:00:00 2001 From: Konstantin Gogov Date: Fri, 21 Aug 2026 16:14:48 +0300 Subject: [PATCH 2/3] ci: retain permission for release PR comments Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6397c835..2cfb3006 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + pull-requests: write steps: - uses: actions/checkout@v6 - name: Setup Node.js From e9fa1388a02301fa3d485d651376b9591a8ae94b Mon Sep 17 00:00:00 2001 From: Konstantin Gogov Date: Fri, 21 Aug 2026 17:06:32 +0300 Subject: [PATCH 3/3] fix: keep automated release commit lintable Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .releaserc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc.json b/.releaserc.json index 8868d05d..0644492a 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -18,7 +18,7 @@ "app/manifest.json", "CHANGELOG.md" ], - "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + "message": "chore(release): ${nextRelease.version}" } ], [