From 450101d9e402f037c22116e23ce8937c6b15fe1c Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Mon, 12 Feb 2024 07:56:08 -0500 Subject: [PATCH] Update auto version bump workflow (#2987) --- .github/workflows/version-auto-bump.yml | 37 +++++++++++++++---------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/version-auto-bump.yml b/.github/workflows/version-auto-bump.yml index 88b86acbd..1805c2f52 100644 --- a/.github/workflows/version-auto-bump.yml +++ b/.github/workflows/version-auto-bump.yml @@ -1,5 +1,5 @@ --- -name: Version Auto Bump +name: Auto Bump Mobile Version on: push: @@ -7,14 +7,12 @@ on: - v** jobs: - setup: - name: "Setup" + bump-version: + name: Bump Mobile Version runs-on: ubuntu-22.04 - outputs: - version_number: ${{ steps.version.outputs.new-version }} steps: - name: Checkout Branch - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Calculate bumped version id: version @@ -29,12 +27,23 @@ jobs: NEW_PATCH=$((CURR_PATCH+1)) NEW_VER=$CURR_MAJOR.$NEW_PATCH echo "New Version: $NEW_VER" - echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT + 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 \ No newline at end of file + - 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 \ No newline at end of file