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