diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc346d5310..1ebe9fa07c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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,