mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
Update auto version bump workflow (#2987)
This commit is contained in:
parent
4e50f1697d
commit
450101d9e4
1 changed files with 23 additions and 14 deletions
37
.github/workflows/version-auto-bump.yml
vendored
37
.github/workflows/version-auto-bump.yml
vendored
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Version Auto Bump
|
name: Auto Bump Mobile Version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -7,14 +7,12 @@ on:
|
||||||
- v**
|
- v**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
bump-version:
|
||||||
name: "Setup"
|
name: Bump Mobile Version
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
|
||||||
version_number: ${{ steps.version.outputs.new-version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Branch
|
- name: Checkout Branch
|
||||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: Calculate bumped version
|
- name: Calculate bumped version
|
||||||
id: version
|
id: version
|
||||||
|
@ -29,12 +27,23 @@ jobs:
|
||||||
NEW_PATCH=$((CURR_PATCH+1))
|
NEW_PATCH=$((CURR_PATCH+1))
|
||||||
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
||||||
echo "New Version: $NEW_VER"
|
echo "New Version: $NEW_VER"
|
||||||
echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT
|
echo "new_version=$NEW_VER" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
trigger_version_bump:
|
- name: Login to Azure - CI Subscription
|
||||||
name: Bump version to ${{ needs.setup.outputs.version_number }}
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
needs: setup
|
with:
|
||||||
uses: ./.github/workflows/version-bump.yml
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||||
with:
|
|
||||||
version_number: ${{ needs.setup.outputs.version_number }}
|
- name: Retrieve bot secrets
|
||||||
secrets: inherit
|
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
|
Loading…
Reference in a new issue