diff --git a/.github/workflows/java-build-for-release.yml b/.github/workflows/java-build-for-release.yml index abe49417..b2f6f4fc 100644 --- a/.github/workflows/java-build-for-release.yml +++ b/.github/workflows/java-build-for-release.yml @@ -16,10 +16,10 @@ jobs: - name: Verify tag on branch # Check main is one of the branches where the tagged commit exists run: | - branches=$(git branch --contains ${{ github.ref }}) --format "%(refname:short)" + branches=($(git branch --contains ${{ github.ref }} --format "%(refname:short)")) found=false - for b in $raw; do - if [ "$x" = "main" ]; then + for b in "${branches[@]}"; do + if [ "$b" = "main" ]; then found=true fi done