mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix the output when skipping creating PR (#6919)
Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
675e3a8017
commit
c91a4cb5d0
8
.github/workflows/bump-master-version.yaml
vendored
8
.github/workflows/bump-master-version.yaml
vendored
@ -21,19 +21,23 @@ jobs:
|
||||
run: |
|
||||
npm i --location=global semver
|
||||
- name: Bump version to first alpha of next minor version
|
||||
id: bump
|
||||
run: |
|
||||
CURRENT_VERSION=$(cat package.json | jq .version --raw-output)
|
||||
|
||||
if ! [[ "${CURRENT_VERSION}" =~ ^\d+\.\d+\.0$ ]]; then
|
||||
echo "Not a minor release"
|
||||
exit 1
|
||||
echo "status=skip" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
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
|
||||
|
||||
echo "status=create" >> $GITHUB_OUTPUT
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
if: ${{ success() }}
|
||||
if: ${{ steps.bump.outputs.status == "create" }}
|
||||
with:
|
||||
add-paths: package.json
|
||||
commit-message: Update package.json version to next preminor because of recent release
|
||||
|
||||
Loading…
Reference in New Issue
Block a user