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