diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fe6cd577..c5096237b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,10 +9,19 @@ jobs: name: Create Release runs-on: ubuntu-20.04 steps: + - name: Branch check + run: | + if [[ "$GITHUB_REF" != "refs/heads/release" ]]; then + echo "===================================" + echo "[!] Can only release from the 'release' branch" + echo "===================================" + exit 1 + fi + - name: Checkout repo uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 with: - ref: rc + ref: release - name: Retrieve Mobile release version id: retrieve-mobile-version @@ -41,7 +50,7 @@ jobs: with: workflow: build.yml workflow_conclusion: success - branch: rc + branch: release - name: Create release uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5 @@ -66,14 +75,14 @@ jobs: - name: Checkout repo uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 with: - ref: rc + ref: release - name: Download F-Droid .apk artifact uses: dawidd6/action-download-artifact@b9571484721e8187f1fd08147b497129f8972c74 # v2.14.0 with: workflow: build.yml workflow_conclusion: success - branch: rc + branch: release name: com.x8bit.bitwarden-fdroid.apk - name: Set up Node