Skip to content
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

Fix bump-master-version worklow #6916

Merged
merged 1 commit into from
Jan 11, 2023
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
12 changes: 10 additions & 2 deletions .github/workflows/bump-master-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ jobs:
npm i --location=global semver
- name: Bump version to first alpha of next minor version
run: |
NEW_VERSION=$(cat package.json | jq .version --raw-output| xargs semver -i preminor --preid alpha)
CURRENT_VERSION=$(cat package.json | jq .version --raw-output)

if ! [[ "${CURRENT_VERSION}" =~ ^\d+\.\d+\.0$ ]]; then
echo "Not a minor release"
exit 1
fi

NEW_VERSION=$(cat package.json | jq .version --raw-output | xargs semver -i preminor --preid alpha)
cat package.json | jq --arg new_version "$NEW_VERSION" '.version = $new_version' > new-package.json
mv new-package.json package.json
- uses: peter-evans/create-pull-request@v4
if: ${{ success() }}
with:
add-paths: package.json
commit-message: Update package.json version to next preminor because of recent release
signoff: true
delete-branch: true
title: Update version to next preminor
labels: chore
labels: skip-changelog