mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix bump-master-version worklow (#6916)
- Don't create a PR if the previous release was just an alpha or beta - Correct the label used on the PR Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
d18cf63a98
commit
630468488b
12
.github/workflows/bump-master-version.yaml
vendored
12
.github/workflows/bump-master-version.yaml
vendored
@ -22,14 +22,22 @@ jobs:
|
|||||||
npm i --location=global semver
|
npm i --location=global semver
|
||||||
- name: Bump version to first alpha of next minor version
|
- name: Bump version to first alpha of next minor version
|
||||||
run: |
|
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
|
cat package.json | jq --arg new_version "$NEW_VERSION" '.version = $new_version' > new-package.json
|
||||||
mv new-package.json package.json
|
mv new-package.json package.json
|
||||||
- uses: peter-evans/create-pull-request@v4
|
- uses: peter-evans/create-pull-request@v4
|
||||||
|
if: ${{ success() }}
|
||||||
with:
|
with:
|
||||||
add-paths: package.json
|
add-paths: package.json
|
||||||
commit-message: Update package.json version to next preminor because of recent release
|
commit-message: Update package.json version to next preminor because of recent release
|
||||||
signoff: true
|
signoff: true
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: Update version to next preminor
|
title: Update version to next preminor
|
||||||
labels: chore
|
labels: skip-changelog
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user