Change trigger for desktop autobump (#3794)
This commit is contained in:
parent
0189401a06
commit
13444307dd
|
@ -2,8 +2,9 @@
|
||||||
name: Version Auto Bump
|
name: Version Auto Bump
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published]
|
tags:
|
||||||
|
- desktop-v**
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
@ -15,7 +16,6 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
version_number: ${{ steps.version.outputs.new-version }}
|
version_number: ${{ steps.version.outputs.new-version }}
|
||||||
if: contains(github.event.release.tag, 'desktop')
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Branch
|
- name: Checkout Branch
|
||||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
|
@ -23,13 +23,17 @@ jobs:
|
||||||
- name: Calculate bumped version
|
- name: Calculate bumped version
|
||||||
id: version
|
id: version
|
||||||
env:
|
env:
|
||||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
RELEASE_TAG: ${{ github.ref }}
|
||||||
run: |
|
run: |
|
||||||
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\1/')
|
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/[a-z]*-v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\1/')
|
||||||
CURR_PATCH=$(echo $RELEASE_TAG | sed -r 's/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\2/')
|
CURR_PATCH=$(echo $RELEASE_TAG | sed -r 's/[a-z]*-v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\2/')
|
||||||
|
echo "Current Major: $CURR_MAJOR"
|
||||||
echo "Current Patch: $CURR_PATCH"
|
echo "Current Patch: $CURR_PATCH"
|
||||||
|
|
||||||
NEW_PATCH=$((CURR_PATCH++))
|
NEW_PATCH=$((CURR_PATCH+1))
|
||||||
|
|
||||||
|
echo "New patch: $NEW_PATCH"
|
||||||
|
|
||||||
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
||||||
echo "New Version: $NEW_VER"
|
echo "New Version: $NEW_VER"
|
||||||
echo "::set-output name=new-version::$NEW_VER"
|
echo "::set-output name=new-version::$NEW_VER"
|
||||||
|
|
Loading…
Reference in New Issue