mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-10 14:33:31 +01:00
f3537b1a74
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
---
|
|
name: Version Auto Bump
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v**
|
|
|
|
jobs:
|
|
setup:
|
|
name: "Setup"
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
version_number: ${{ steps.version.outputs.new-version }}
|
|
steps:
|
|
- name: Checkout Branch
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
|
|
|
- name: Calculate bumped version
|
|
id: version
|
|
env:
|
|
RELEASE_TAG: ${{ github.ref }}
|
|
run: |
|
|
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/')
|
|
echo "Current Major: $CURR_MAJOR"
|
|
echo "Current Patch: $CURR_PATCH"
|
|
|
|
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: Bump version to ${{ needs.setup.outputs.version_number }}
|
|
needs: setup
|
|
uses: ./.github/workflows/version-bump.yml
|
|
with:
|
|
version_number: ${{ needs.setup.outputs.version_number }}
|
|
secrets: inherit |