File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 84
84
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
85
85
86
86
# Increment package version:
87
- npm version ${{ github.event.inputs.version }}
87
+ npm version ${{ github.event.inputs.version }} --no-git-tag-version
88
+
89
+ # Define variable for new version:
90
+ NEW_VERSION=$(node -p "require('./package.json').version")
91
+
92
+ # Replace branch in README.md link definitions for badges with the new version:
93
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch=[^ ]+/branch=v${NEW_VERSION}/g"
94
+
95
+ # Create a new commit and tag:
96
+ git add package.json README.md
97
+ git commit -m "Release v${NEW_VERSION}"
98
+ git tag -a "v${NEW_VERSION}" -m "Release v{NEW_VERSION}"
88
99
89
100
# Push changes to GitHub:
90
101
git push --follow-tags
You can’t perform that action at this time.
0 commit comments