diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index af33c69..840ddf9 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -75,7 +75,7 @@ jobs: id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - name: Publish to S3 bucket - 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 -Ps3Deploy - name: Publish to GitHub Packages if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}