1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Vince Grassia
4056457c10 BRE-549 - Add rc branch logic (#708)
(cherry picked from commit 1464d72b27)
2025-01-15 08:23:55 -05:00
3 changed files with 19 additions and 11 deletions

View File

@@ -5,6 +5,8 @@ on:
push: push:
branches: branches:
- "main" - "main"
- "rc"
- "hotfix-rc"
workflow_dispatch: {} workflow_dispatch: {}
jobs: jobs:
@@ -634,7 +636,11 @@ jobs:
- macos-gui - macos-gui
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: github.ref == 'refs/heads/main' && contains(needs.*.result, 'failure') if: |
(github.ref == 'refs/heads/main'
|| github.ref == 'refs/heads/rc'
|| github.ref == 'refs/heads/hotfix-rc')
&& contains(needs.*.result, 'failure')
run: exit 1 run: exit 1
- name: Login to Azure - CI subscription - name: Login to Azure - CI subscription

View File

@@ -18,17 +18,17 @@ jobs:
name: Setup name: Setup
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
outputs: outputs:
release-version: ${{ steps.version.outputs.version }} release_version: ${{ steps.version.outputs.version }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Branch check - name: Branch check
if: ${{ github.event.inputs.release_type != 'Dry Run' }} if: ${{ inputs.release_type != 'Dry Run' }}
run: | run: |
if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
echo "===================================" echo "==================================="
echo "[!] Can only release from the 'main' branch" echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches"
echo "===================================" echo "==================================="
exit 1 exit 1
fi fi
@@ -37,7 +37,7 @@ jobs:
id: version id: version
uses: bitwarden/gh-actions/release-version-check@main uses: bitwarden/gh-actions/release-version-check@main
with: with:
release-type: ${{ github.event.inputs.release_type }} release-type: ${{ inputs.release_type }}
project-type: ts project-type: ts
file: package.json file: package.json
@@ -47,7 +47,7 @@ jobs:
needs: setup needs: setup
steps: steps:
- name: Download all artifacts - name: Download all artifacts
if: ${{ github.event.inputs.release_type != 'Dry Run' }} if: ${{ inputs.release_type != 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@main uses: bitwarden/gh-actions/download-artifacts@main
with: with:
workflow: build.yml workflow: build.yml
@@ -55,7 +55,7 @@ jobs:
branch: ${{ github.ref_name }} branch: ${{ github.ref_name }}
- name: Dry Run - Download all artifacts - name: Dry Run - Download all artifacts
if: ${{ github.event.inputs.release_type == 'Dry Run' }} if: ${{ inputs.release_type == 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@main uses: bitwarden/gh-actions/download-artifacts@main
with: with:
workflow: build.yml workflow: build.yml
@@ -63,10 +63,10 @@ jobs:
branch: main branch: main
- name: Create release - name: Create release
if: ${{ github.event.inputs.release_type != 'Dry Run' }} if: ${{ inputs.release_type != 'Dry Run' }}
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
env: env:
PKG_VERSION: ${{ needs.setup.outputs.release-version }} PKG_VERSION: ${{ needs.setup.outputs.release_version }}
with: with:
artifacts: "./bwdc-windows-${{ env.PKG_VERSION }}.zip, artifacts: "./bwdc-windows-${{ env.PKG_VERSION }}.zip,
./bwdc-macos-${{ env.PKG_VERSION }}.zip, ./bwdc-macos-${{ env.PKG_VERSION }}.zip,

View File

@@ -5,6 +5,8 @@ on:
push: push:
branches: branches:
- "main" - "main"
- "rc"
- "hotfix-rc"
pull_request: pull_request:
jobs: jobs: