diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e51486af..895bd5b9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,7 +28,7 @@ jobs: # Make github release - name: Release uses: softprops/action-gh-release@v2 - if: ${{ github.ref_name == 'main' && github.event.pull_request.merged == true}} # only make snapshot release if it is a push to main + if: ${{ github.event.pull_request.base.ref == 'main' && github.event.action == 'closed' && github.event.pull_request.merged == true}} # only make snapshot release if it is a push to main with: name: Latest snapshot release tag_name: snapshot