mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Fix release workflow to allow releases from 'rc' or 'hotfix' branches only (#2158)
This commit is contained in:
parent
d4231589ad
commit
b38fb3bee0
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -12,20 +12,19 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
release-version: ${{ steps.version.outputs.package-version }}
|
||||
branch-name: ${{ steps.branch.outputs.branch-name }}
|
||||
steps:
|
||||
- name: Branch check
|
||||
run: |
|
||||
if [[ "$GITHUB_REF" != "refs/heads/release" ]]; then
|
||||
if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix" ]]; then
|
||||
echo "==================================="
|
||||
echo "[!] Can only release from the 'release' branch"
|
||||
echo "[!] Can only release from the 'rc' or 'hotfix' branches"
|
||||
echo "==================================="
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
with:
|
||||
ref: release
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
@ -42,6 +41,12 @@ jobs:
|
||||
|
||||
echo "::set-output name=package-version::$version"
|
||||
|
||||
- name: Get branch name
|
||||
id: branch
|
||||
run: |
|
||||
BRANCH_NAME=$(basename ${{ github.ref }})
|
||||
echo "::set-output name=branch-name::$BRANCH_NAME"
|
||||
|
||||
|
||||
locales-test:
|
||||
name: Locales Test
|
||||
@ -88,7 +93,7 @@ jobs:
|
||||
with:
|
||||
workflow: build.yml
|
||||
workflow_conclusion: success
|
||||
branch: release
|
||||
branch: ${{ needs.setup.outputs.branch-name }}
|
||||
artifacts: 'browser-source-*.zip,
|
||||
dist-chrome-*.zip,
|
||||
dist-opera-*.zip,
|
||||
|
Loading…
Reference in New Issue
Block a user