diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 4a1abef..582cdd7 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -62,7 +62,7 @@ jobs: id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - name: Publish to GitHub Packages - if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }} + if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }} run: mvn --batch-mode deploy -PgithubDeploy env: GITHUB_TOKEN: ${{ github.token }}