diff --git a/.github/workflows/release.yml b/.github/workflows/create-release.yml similarity index 96% rename from .github/workflows/release.yml rename to .github/workflows/create-release.yml index 08dec45a2..5de755624 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/create-release.yml @@ -23,13 +23,15 @@ jobs: name: Compile and Test runs-on: ubuntu-latest needs: get-version - if: github.ref_type == 'tag' && needs.get-version.outputs.versionType != 'unknown' + if: needs.get-version.outputs.versionType != 'unknown' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Check the git tag is signed run: git cat-file -p "${GITHUB_REF_NAME}" | grep "BEGIN SSH SIGNATURE" + - name: Check the git tag is on release or main branch + run: git branch --contains "${GITHUB_REF_NAME}" | sed -E "grep -E '^\**\s*(main|release/.*)\s*$' - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: distribution: ${{ env.JAVA_DIST }}