Bitwarden-app-android-iphon.../.github/workflows/version-auto-bump.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
YAML
Raw Normal View History

---
2022-07-29 12:18:57 +02:00
name: Version Auto Bump
on:
2022-10-17 11:50:38 +02:00
push:
tags:
- v**
2022-07-29 12:18:57 +02:00
jobs:
setup:
name: "Setup"
runs-on: ubuntu-22.04
outputs:
version_number: ${{ steps.version.outputs.new-version }}
2022-07-29 12:18:57 +02:00
steps:
- name: Checkout Branch
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Calculate bumped version
id: version
env:
2022-10-17 11:50:38 +02:00
RELEASE_TAG: ${{ github.ref }}
run: |
2023-01-16 18:45:23 +01:00
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/refs\/tags\/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\1/')
CURR_PATCH=$(echo $RELEASE_TAG | sed -r 's/refs\/tags\/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\2/')
2022-10-17 11:50:38 +02:00
echo "Current Major: $CURR_MAJOR"
echo "Current Patch: $CURR_PATCH"
2022-10-17 11:50:38 +02:00
NEW_PATCH=$((CURR_PATCH+1))
NEW_VER=$CURR_MAJOR.$NEW_PATCH
echo "New Version: $NEW_VER"
echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT
trigger_version_bump:
name: "Version bump"
runs-on: ubuntu-22.04
needs:
- setup
steps:
- name: Bump version to ${{ needs.setup.outputs.version_number }}
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 }}