File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 88 publish :
99 runs-on : ubuntu-latest
1010 permissions :
11- contents : read
11+ contents : write
1212 id-token : write
1313 steps :
1414 - uses : actions/checkout@v4
15+ with :
16+ token : ${{ secrets.GITHUB_TOKEN }}
1517
1618 - uses : pnpm/action-setup@v4
1719
2123 cache : ' pnpm'
2224 registry-url : ' https://registry.npmjs.org'
2325
26+ - name : Extract version from tag
27+ id : version
28+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
29+
30+ - name : Update package.json version
31+ run : |
32+ pnpm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version --allow-same-version
33+
34+ - name : Commit version bump
35+ run : |
36+ git config user.name "github-actions[bot]"
37+ git config user.email "github-actions[bot]@users.noreply.github.com"
38+ git add package.json
39+ git commit -m "chore: bump version to ${{ steps.version.outputs.VERSION }}" || echo "No changes to commit"
40+ git push origin HEAD:${{ github.event.release.target_commitish }}
41+
2442 - name : Install dependencies
2543 run : pnpm install --frozen-lockfile
2644
You can’t perform that action at this time.
0 commit comments