Skip to content

Commit 4f7e84c

Browse files
committed
fix: automagically bump version in readme on release
1 parent a81eeb8 commit 4f7e84c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ jobs:
5555
run: |
5656
git config --global tag.gpgsign true
5757
58+
- name: Bump version
59+
run: |
60+
OLD_VERSION=$(node -p "require('./package.json').version")
61+
npm version ${{ github.event.inputs.version }} --no-git-tag-version
62+
VERSION=$(node -p "require('./package.json').version")
63+
sed -i "s/$OLD_VERSION/$VERSION/g" README.md
64+
5865
-
5966
name: Build
6067
run: |
@@ -65,7 +72,6 @@ jobs:
6572
env:
6673
GH_TOKEN: ${{ github.token }}
6774
run: |
68-
npm version ${{ github.event.inputs.version }} --no-git-tag-version
6975
VERSION=$(node -p "require('./package.json').version")
7076
git commit -m "release: $VERSION" -a
7177
git push

0 commit comments

Comments
 (0)