2022-08-02 00:51:34 +02:00
|
|
|
---
|
2022-07-29 12:18:47 +02:00
|
|
|
name: Version Auto Bump
|
|
|
|
|
|
|
|
on:
|
2022-10-17 11:50:54 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- desktop-v**
|
2022-07-29 12:18:47 +02:00
|
|
|
|
2022-08-02 00:51:34 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2022-07-29 12:18:47 +02:00
|
|
|
|
2022-08-02 00:51:34 +02:00
|
|
|
jobs:
|
2022-07-29 12:18:47 +02:00
|
|
|
setup:
|
|
|
|
name: "Setup"
|
2022-10-11 16:35:25 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2022-08-02 00:51:34 +02:00
|
|
|
outputs:
|
|
|
|
version_number: ${{ steps.version.outputs.new-version }}
|
2022-07-29 12:18:47 +02:00
|
|
|
steps:
|
2022-08-02 00:51:34 +02:00
|
|
|
- name: Checkout Branch
|
2023-06-29 16:46:56 +02:00
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2022-08-02 00:51:34 +02:00
|
|
|
|
2022-10-11 16:35:25 +02:00
|
|
|
- name: Calculate bumped version
|
2022-08-02 00:51:34 +02:00
|
|
|
id: version
|
|
|
|
env:
|
2022-10-17 11:50:54 +02:00
|
|
|
RELEASE_TAG: ${{ github.ref }}
|
2022-08-02 00:51:34 +02:00
|
|
|
run: |
|
2023-01-16 18:45:20 +01:00
|
|
|
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/refs\/tags\/[a-z]*-v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\1/')
|
|
|
|
CURR_PATCH=$(echo $RELEASE_TAG | sed -r 's/refs\/tags\/[a-z]*-v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\2/')
|
2022-10-17 11:50:54 +02:00
|
|
|
echo "Current Major: $CURR_MAJOR"
|
2022-10-11 16:35:25 +02:00
|
|
|
echo "Current Patch: $CURR_PATCH"
|
2022-08-02 00:51:34 +02:00
|
|
|
|
2022-10-17 11:50:54 +02:00
|
|
|
NEW_PATCH=$((CURR_PATCH+1))
|
|
|
|
|
|
|
|
echo "New patch: $NEW_PATCH"
|
|
|
|
|
2022-10-11 16:35:25 +02:00
|
|
|
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
|
|
|
echo "New Version: $NEW_VER"
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT
|
2022-08-02 00:51:34 +02:00
|
|
|
|
|
|
|
trigger_version_bump:
|
2023-07-10 15:06:05 +02:00
|
|
|
name: Bump version to ${{ needs.setup.outputs.version_number }}
|
|
|
|
needs: setup
|
|
|
|
uses: ./.github/workflows/version-bump.yml
|
|
|
|
secrets:
|
|
|
|
AZURE_PROD_KV_CREDENTIALS: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
|
|
|
with:
|
|
|
|
version_number: ${{ needs.setup.outputs.version_number }}
|
|
|
|
client: "Desktop"
|