Skip to content

Commit c999559

Browse files
authored
Fix version bump in netlicensing-js-release workflow
Updated version bump process to bypass npm bug and extract version from package.json.
1 parent d2ba0c7 commit c999559

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/netlicensing-js-release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,13 @@ jobs:
9595
- name: Bump version and tag
9696
id: bump
9797
run: |
98-
npm config set tag-version-prefix ''
99-
NEW_VERSION=$(npm version ${{ inputs.version }} -m "Release %s")
98+
# 1. Pass the empty prefix directly via CLI flag (bypasses the npm bug)
99+
npm version ${{ inputs.version }} --tag-version-prefix="" -m "Release %s"
100+
101+
# 2. Extract the clean version directly from package.json
102+
NEW_VERSION=$(node -p "require('./package.json').version")
103+
104+
# 3. Save it to outputs and push
100105
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
101106
git push --follow-tags
102107

0 commit comments

Comments
 (0)