Skip to content

Commit 4056457

Browse files
committed
BRE-549 - Add rc branch logic (#708)
(cherry picked from commit 1464d72)
1 parent f5cbd8f commit 4056457

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- "main"
8+
- "rc"
9+
- "hotfix-rc"
810
workflow_dispatch: {}
911

1012
jobs:
@@ -575,7 +577,7 @@ jobs:
575577

576578
- name: Install Node dependencies
577579
run: npm install
578-
580+
579581
- name: Set up private auth key
580582
run: |
581583
mkdir ~/private_keys
@@ -634,7 +636,11 @@ jobs:
634636
- macos-gui
635637
steps:
636638
- name: Check if any job failed
637-
if: github.ref == 'refs/heads/main' && contains(needs.*.result, 'failure')
639+
if: |
640+
(github.ref == 'refs/heads/main'
641+
|| github.ref == 'refs/heads/rc'
642+
|| github.ref == 'refs/heads/hotfix-rc')
643+
&& contains(needs.*.result, 'failure')
638644
run: exit 1
639645

640646
- name: Login to Azure - CI subscription

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
name: Setup
1919
runs-on: ubuntu-24.04
2020
outputs:
21-
release-version: ${{ steps.version.outputs.version }}
21+
release_version: ${{ steps.version.outputs.version }}
2222
steps:
2323
- name: Checkout repo
2424
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2525

2626
- name: Branch check
27-
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
27+
if: ${{ inputs.release_type != 'Dry Run' }}
2828
run: |
29-
if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then
29+
if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
3030
echo "==================================="
31-
echo "[!] Can only release from the 'main' branch"
31+
echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches"
3232
echo "==================================="
3333
exit 1
3434
fi
@@ -37,7 +37,7 @@ jobs:
3737
id: version
3838
uses: bitwarden/gh-actions/release-version-check@main
3939
with:
40-
release-type: ${{ github.event.inputs.release_type }}
40+
release-type: ${{ inputs.release_type }}
4141
project-type: ts
4242
file: package.json
4343

@@ -47,26 +47,26 @@ jobs:
4747
needs: setup
4848
steps:
4949
- name: Download all artifacts
50-
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
50+
if: ${{ inputs.release_type != 'Dry Run' }}
5151
uses: bitwarden/gh-actions/download-artifacts@main
5252
with:
5353
workflow: build.yml
5454
workflow_conclusion: success
5555
branch: ${{ github.ref_name }}
5656

5757
- name: Dry Run - Download all artifacts
58-
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
58+
if: ${{ inputs.release_type == 'Dry Run' }}
5959
uses: bitwarden/gh-actions/download-artifacts@main
6060
with:
6161
workflow: build.yml
6262
workflow_conclusion: success
6363
branch: main
6464

6565
- name: Create release
66-
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
66+
if: ${{ inputs.release_type != 'Dry Run' }}
6767
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
6868
env:
69-
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
69+
PKG_VERSION: ${{ needs.setup.outputs.release_version }}
7070
with:
7171
artifacts: "./bwdc-windows-${{ env.PKG_VERSION }}.zip,
7272
./bwdc-macos-${{ env.PKG_VERSION }}.zip,

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- "main"
8+
- "rc"
9+
- "hotfix-rc"
810
pull_request:
911

1012
jobs:

0 commit comments

Comments
 (0)