Skip to content

Commit

Permalink
ci: use MavenCentral in JReleaser (#1226)
Browse files Browse the repository at this point in the history
This PR updates the configuration of JReleaser to deploy the solver
using Maven Central.

1. Uses two new env var for authentication:
`JRELEASER_MAVENCENTRAL_USERNAME` and `JRELEASER_MAVENCENTRAL_PASSWORD`.
2. Updates the config according to the
[documentation](https://jreleaser.org/guide/latest/reference/deploy/maven/maven-central.html).
  • Loading branch information
zepfred authored Nov 26, 2024
1 parent 1354605 commit 1d83784
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ jobs:
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN_USER }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN_USER }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVEN_CENTRAL_TOKEN }}

- name: JReleaser release output
uses: actions/upload-artifact@v4
Expand Down
9 changes: 4 additions & 5 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ release:

deploy:
maven:
nexus2:
maven-central:
mavenCentral:
timefold:
active: ALWAYS
url: https://s01.oss.sonatype.org/service/local
url: https://central.sonatype.com/api/v1/publisher
authorization: BASIC
# TODO Remove verifyPom tag, hack for https://github.com/jreleaser/jreleaser/issues/1397
verifyPom: false
closeRepository: true
releaseRepository: false
stagingRepositories:
- "target/staging-deploy"
artifactOverrides:
Expand Down

0 comments on commit 1d83784

Please sign in to comment.