Skip to content

Commit

Permalink
maven-publish-fix - fixing maven central publish
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Chmielewski <[email protected]>
  • Loading branch information
kristoffSC committed Aug 4, 2024
1 parent 4fff39d commit 1b8d80c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check release tag match # ... and fail fast if they do not
run: diff <(echo "${{ github.ref_name }}") <(echo "$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)")

- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
distribution: 'temurin'
cache: maven

- name: Build
Expand All @@ -34,20 +34,20 @@ jobs:
mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS test integration-test
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
distribution: 'temurin'
server-id: ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PRIVATE_KEY_PASSWORD

- name: Publish to Apache Maven Central
if: github.event.release
run: mvn deploy -P release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}

0 comments on commit 1b8d80c

Please sign in to comment.