Commit 9be1afb
Automate version bumping in release workflow (#169)
## Summary
This PR updates the release workflow to automatically bump the package
version during the release process, ensuring that version numbers in
`package.json` and `package-lock.json` stay in sync with git tags.
## Key Changes
- **Permission update**: Changed `contents` permission from `read` to
`write` to allow the workflow to commit and push changes
- **Version bumping**: Added a step to extract the version from the git
tag (removing the `v` prefix) and update it in `package.json`
- **Git commit**: Added a step to configure git user credentials and
commit the version bump changes back to the main branch with a
descriptive commit message
## Implementation Details
- The version is extracted from `GITHUB_REF_NAME` environment variable
using bash parameter expansion (`${GITHUB_REF_NAME#v}`)
- Git configuration uses the GitHub Actions bot identity for commits
- Both `package.json` and `package-lock.json` are committed to maintain
lockfile consistency
- The version bump occurs after tests pass but before the build and
publish steps
https://claude.ai/code/session_01MwzSa6WMkR5d7xy1nptdHZ
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2558337 commit 9be1afb
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
0 commit comments