Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
name: Stage on npm
needs: test
runs-on: ubuntu-latest
outputs:
version: ${{ steps.meta.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -83,3 +85,42 @@ jobs:

- name: Stage package on npm
run: npm stage publish

commit-version:
name: Commit version bump
needs: stage
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: true

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
package-manager-cache: false

- name: Install dependencies
run: npm ci

- name: Set package version
run: npm version "${{ needs.stage.outputs.version }}" --no-git-tag-version --allow-same-version

- name: Commit and push version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

if git diff --quiet -- package.json package-lock.json; then
echo "package.json and package-lock.json already match release version; nothing to commit."
exit 0
fi

git add package.json package-lock.json
git commit -m "chore(release): bump version to ${{ needs.stage.outputs.version }}"
git push