mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
49 lines
No EOL
1.7 KiB
YAML
49 lines
No EOL
1.7 KiB
YAML
---
|
|
name: Auto Bump Mobile Version
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v**
|
|
|
|
jobs:
|
|
bump-version:
|
|
name: Bump Mobile Version
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout Branch
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
- 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
|
|
|
|
- name: Login to Azure - CI Subscription
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
|
with:
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
|
|
|
- name: Retrieve bot secrets
|
|
id: retrieve-bot-secrets
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
|
with:
|
|
keyvault: bitwarden-ci
|
|
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
|
|
|
- name: "Bump version to ${{ steps.version.outputs.new_version }}"
|
|
env:
|
|
GH_TOKEN: ${{ steps.retrieve-bot-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
|
run: |
|
|
echo '{"cut_rc_branch": "false", "version_number": "${{ steps.version.outputs.new_version }}"}' | \
|
|
gh workflow run version-bump.yml --json --repo bitwarden/mobile |