From 8a28fa1df52bdbe516989b7745a46e8ccc61507a Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:25:05 -0400 Subject: [PATCH] Uncomment branch check --- .github/workflows/publish-java.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-java.yml b/.github/workflows/publish-java.yml index da46d3930..f3e3e9a86 100644 --- a/.github/workflows/publish-java.yml +++ b/.github/workflows/publish-java.yml @@ -37,15 +37,15 @@ jobs: - name: Checkout repo uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - # - name: Branch check - # if: ${{ inputs.release_type != 'Dry Run' }} - # run: | - # if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then - # echo "===================================" - # echo "[!] Can only release from the 'main' branch" - # echo "===================================" - # exit 1 - # fi + - name: Branch check + if: ${{ inputs.release_type != 'Dry Run' }} + run: | + if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then + echo "===================================" + echo "[!] Can only release from the 'main' branch" + echo "===================================" + exit 1 + fi - name: Version output id: version-output