Skip to content

autobump version after release #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ jobs:
id: set-version
run: |
VERSION=`cat ./dist/.version`
NEXT_VERSION=`cat ./dist/.version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
echo ::set-output name=name::`cat ./dist/.name`
tmp=$(mktemp)
git config --global user.name 'ProjectBot'
git config --global user.email '[email protected]'
jq --arg version "${VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
jq --arg version "${NEXT_VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
git add package.json
git commit -m 'auto bump version with release'
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
Expand Down