From 59a844e7b0413cb1901fefbd51a04628ad8aee5b Mon Sep 17 00:00:00 2001 From: Michal Checinski Date: Thu, 26 Sep 2024 15:00:47 +0200 Subject: [PATCH] Update branch check in publish-java.yml to only allow releases from the 'main' branch --- .github/workflows/publish-java.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-java.yml b/.github/workflows/publish-java.yml index 5217b34f3..1ae47d080 100644 --- a/.github/workflows/publish-java.yml +++ b/.github/workflows/publish-java.yml @@ -34,9 +34,9 @@ jobs: - name: Branch check if: ${{ inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then + if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then echo "===================================" - echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches" + echo "[!] Can only release from the 'main' branch" echo "===================================" exit 1 fi