1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

Update version bump workflow (#7238)

This commit is contained in:
Vince Grassia
2023-12-15 07:30:26 -05:00
committed by GitHub
parent 96d1c83385
commit c95e0f3d9b
2 changed files with 39 additions and 23 deletions

29
.github/workflows/_cut_rc.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
---
name: Cut RC Branch
on:
workflow_call:
jobs:
cut-rc:
name: Cut RC branch
runs-on: ubuntu-22.04
steps:
- name: Checkout Branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: main
- name: Check if RC branch exists
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: Cut RC branch
run: |
git switch --quiet --create rc
git push --quiet --set-upstream origin rc

View File

@@ -24,29 +24,10 @@ on:
version_number: version_number:
description: "New version (example: '2024.1.0')" description: "New version (example: '2024.1.0')"
required: true required: true
cut_rc_branch:
workflow_call: description: "Cut RC branch?"
inputs: default: true
bump_browser:
description: "Bump Browser?"
type: boolean type: boolean
default: false
bump_cli:
description: "Bump CLI?"
type: boolean
default: false
bump_desktop:
description: "Bump Desktop?"
type: boolean
default: false
bump_web:
description: "Bump Web?"
type: boolean
default: false
version_number:
description: "New version (example: '2024.1.0')"
required: true
type: string
jobs: jobs:
bump_version: bump_version:
@@ -72,7 +53,6 @@ jobs:
with: with:
repository: bitwarden/clients repository: bitwarden/clients
ref: main ref: main
token: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
- name: Import GPG key - name: Import GPG key
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0 uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
@@ -313,3 +293,10 @@ jobs:
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }} GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }} PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
run: gh pr merge $PR_NUMBER --squash --auto --delete-branch run: gh pr merge $PR_NUMBER --squash --auto --delete-branch
cut_rc:
name: Cut RC Branch
if: ${{ inputs.cut_rc_branch == true }}
needs: bump_version
uses: ./.github/workflows/_cut_rc.yml
secrets: inherit