1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-20 19:14:32 -05:00

enabling releasing from non-rc branch (#1648)

This commit is contained in:
Joseph Flinn 2021-10-19 15:13:42 -07:00 committed by GitHub
parent c04c4e6e4a
commit b4d2faa0cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,12 @@ name: Release
on: on:
workflow_dispatch: workflow_dispatch:
inputs: {} inputs:
release_branch:
description: "branch to release from"
required: true
default: "rc"
jobs: jobs:
setup: setup:
@ -12,19 +17,10 @@ jobs:
outputs: outputs:
release_version: ${{ steps.version.outputs.package }} release_version: ${{ steps.version.outputs.package }}
steps: steps:
- name: Branch check
run: |
if [[ "$GITHUB_REF" != "refs/heads/rc" ]]; then
echo "==================================="
echo "[!] Can only release from rc branch"
echo "==================================="
exit 1
fi
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with: with:
ref: rc ref: ${{ github.event.inputs.release_branch }}
- name: Check Release Version - name: Check Release Version
id: version id: version
@ -66,12 +62,12 @@ jobs:
echo "NAME_LOWER: $NAME_LOWER" echo "NAME_LOWER: $NAME_LOWER"
echo "::set-output name=name_lower::$NAME_LOWER" echo "::set-output name=name_lower::$NAME_LOWER"
- name: Download latest RC ${{ matrix.name }} asset - name: Download latest ${{ github.event.inputs.release_branch }} ${{ matrix.name }} asset
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783 uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
with: with:
workflow: build.yml workflow: build.yml
workflow_conclusion: success workflow_conclusion: success
branch: rc branch: ${{ github.event.inputs.release_branch }}
artifacts: ${{ matrix.name }}.zip artifacts: ${{ matrix.name }}.zip
- name: Login to Azure - name: Login to Azure
@ -107,12 +103,12 @@ jobs:
- setup - setup
- deploy - deploy
steps: steps:
- name: Download latest RC docker-stub - name: Download latest ${{ github.event.inputs.release_branch }} docker-stub
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783 uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
with: with:
workflow: build.yml workflow: build.yml
workflow_conclusion: success workflow_conclusion: success
branch: rc branch: ${{ github.event.inputs.release_branch }}
artifacts: "docker-stub.zip, artifacts: "docker-stub.zip,
swagger.json" swagger.json"