Skip to content

Commit e835dfc

Browse files
committed
autobump version after release
1 parent b345ea8 commit e835dfc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ jobs:
126126
id: set-version
127127
run: |
128128
VERSION=`cat ./dist/.version`
129+
NEXT_VERSION=`cat ./dist/.version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
129130
echo ::set-output name=name::`cat ./dist/.name`
130131
tmp=$(mktemp)
131132
git config --global user.name 'ProjectBot'
132133
git config --global user.email '[email protected]'
133-
jq --arg version "${VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
134+
jq --arg version "${NEXT_VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
134135
git add package.json
135136
git commit -m 'auto bump version with release'
136137
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json

0 commit comments

Comments
 (0)