File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 - name : Calculate next version
3030 id : next_version
3131 run : |
32- # Use npm version to calculate the next version without modifying files
32+ # Use npm version to calculate the next version without modifying files
3333 CURRENT_VERSION=$(node -p "require('./package.json').version")
34- NEW_VERSION=$(npm version $ {{ github.event.inputs.version }} --no-git-tag-version )
34+ NEW_VERSION=$(npx semver $CURRENT_VERSION -i $ {{ github.event.inputs.version }})
3535
3636 # Restore package.json to avoid dirty state
3737 git checkout package.json package-lock.json 2>/dev/null || true
8282 - name : Bump version and update CHANGELOG
8383 id : bump
8484 run : |
85- NEW_VERSION=$(npm version ${{ github.event.inputs.version }} --no-git-tag-version)
8685 echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
8786 sed -i "s/## \[Unreleased\]/## [Unreleased]\n\n## [$NEW_VERSION] - $(date +%Y-%m-%d)/" CHANGELOG.md
8887
@@ -106,6 +105,7 @@ jobs:
106105 name : ${{ steps.bump.outputs.version }}
107106 body : ${{ steps.changelog.outputs.notes }}
108107 files : ${{ steps.pack.outputs.tgz }}
108+ target_commitish : ${{ github.sha }}
109109 fail_on_unmatched_files : true
110110 draft : false
111111 prerelease : false
You can’t perform that action at this time.
0 commit comments