Skip to content

Commit 685ceb6

Browse files
yerzhansaclaude
andcommitted
fix: release workflow commits version bump with branch bypass
Uses npm version to bump both package.json and package-lock.json. Tags with -f to handle retries. Requires enforce_admins disabled on branch protection to allow GitHub Actions to push. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 04589c8 commit 685ceb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
run: |
5151
git config user.name "github-actions[bot]"
5252
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
53-
sed -i "s/\"version\": \".*\"/\"version\": \"${VERSION}\"/" package.json
54-
git add package.json
53+
npm version "${VERSION}" --no-git-tag-version
54+
git add package.json package-lock.json
5555
git diff --cached --quiet && echo "Version already ${VERSION}, skipping commit" || git commit -m "${VERSION}"
56-
git tag "v${VERSION}"
56+
git tag -f "v${VERSION}"
5757
git push origin main --tags
5858
5959
- name: Publish to npm

0 commit comments

Comments
 (0)