Skip to content

Commit

Permalink
Fix artifactory SNAPSHOT publishing w/o credentials (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev authored May 16, 2024
1 parent f7f6297 commit aa381c3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ jobs:
--batch-mode \
-DnewVersion=${{ steps.resolve_version.outputs.resolved_version }}
# Maven deploy lifecycle will build, run tests, verify, sign, and deploy
mvn \
deploy \
--batch-mode \
--settings .maven_settings.xml \
-P sign-artifacts
# Only attempt to publish artifact if we have credentials
if [ -n "${{ secrets.ARTIFACTORY_PASSWORD }}" ]; then
# Maven deploy lifecycle will build, run tests, verify, sign, and deploy
mvn deploy --batch-mode --settings .maven_settings.xml -P sign-artifacts
else
# Otherwise, Maven verify lifecycle will build, run tests, and verify
mvn verify --batch-mode
fi
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
Expand Down

0 comments on commit aa381c3

Please sign in to comment.