1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

DEVOPS-1696 - Fix Version Bump workflow (#7774)

This commit is contained in:
Vince Grassia 2024-02-05 08:49:36 -05:00 committed by GitHub
parent a7ef07a9ec
commit 219ef8d524
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,9 +51,18 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
repository: bitwarden/clients
ref: main
- name: Check if RC branch exists
if: ${{ inputs.cut_rc_branch == true }}
run: |
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l)
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then
echo "Remote RC branch exists."
echo "Please delete current RC branch before running again."
exit 1
fi
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
with:
@ -307,14 +316,73 @@ jobs:
with:
ref: main
- name: Check if RC branch exists
### Browser
- name: Browser - Verify version has been updated
if: ${{ inputs.bump_browser == true }}
env:
NEW_VERSION: ${{ inputs.version_number }}
run: |
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l)
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then
echo "Remote RC branch exists."
echo "Please delete current RC branch before running again."
exit 1
fi
CURRENT_VERSION=$(cat package.json | jq -r '.version')
# Wait for version to change.
while [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]]
do
echo "Waiting for version to be updated..."
sleep 10
git pull --force
done
working-directory: apps/browser
### CLI
- name: CLI - Verify version has been updated
if: ${{ inputs.bump_cli == true }}
env:
NEW_VERSION: ${{ inputs.version_number }}
run: |
CURRENT_VERSION=$(cat package.json | jq -r '.version')
# Wait for version to change.
while [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]]
do
echo "Waiting for version to be updated..."
sleep 10
git pull --force
done
working-directory: apps/cli
### Desktop
- name: Desktop - Verify version has been updated
if: ${{ inputs.bump_desktop == true }}
env:
NEW_VERSION: ${{ inputs.version_number }}
run: |
CURRENT_VERSION=$(cat package.json | jq -r '.version')
# Wait for version to change.
while [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]]
do
echo "Waiting for version to be updated..."
sleep 10
git pull --force
done
working-directory: apps/desktop
### Web
- name: Web - Verify version has been updated
if: ${{ inputs.bump_web == true }}
env:
NEW_VERSION: ${{ inputs.version_number }}
run: |
CURRENT_VERSION=$(cat package.json | jq -r '.version')
# Wait for version to change.
while [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]]
do
echo "Waiting for version to be updated..."
sleep 10
git pull --force
done
working-directory: apps/web
- name: Cut RC branch
run: |