diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ddd6e91e..bbb4c0cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,14 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v4 + + - name: Fail if not running on main branch + if: ${{ github.ref != 'refs/heads/main' }} + uses: actions/github-script@v7 + with: + script: | + core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main') + - name: Set up Java uses: actions/setup-java@v4 with: