-
Notifications
You must be signed in to change notification settings - Fork 21
ci: publish workflow #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ci: publish workflow #169
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2b15fee
Add central publishing package
matthewelwell c6de8de
Add publish workflow
matthewelwell b8a6a50
Add current branch to workflow
matthewelwell b214417
fix syntax
matthewelwell 7bea2fe
Add runs-on and name
matthewelwell 4aef211
Add checkout and setup java
matthewelwell 4846482
Add skip tests
matthewelwell bfa831a
Remove skipTests and checkout submodules
matthewelwell fe2710b
Play around with more vars to set up java
matthewelwell 80ba05d
Bump version
matthewelwell 1024eed
Add profile
matthewelwell fdffb9e
Revert changes to pom.xml
matthewelwell 725d745
Remove branch from publish workflow
matthewelwell f510462
Bump java version
matthewelwell 139da3b
Add reference link
matthewelwell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # References: | ||
| # - https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven | ||
|
|
||
| name: "Publish to Maven Central" | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "*" | ||
|
|
||
| jobs: | ||
| publish-to-maven-central: | ||
| runs-on: ubuntu-latest | ||
| name: Publish to Maven Central | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: adopt | ||
| java-version: 21 | ||
| server-id: central | ||
| server-username: MAVEN_USERNAME | ||
| server-password: MAVEN_PASSWORD | ||
|
|
||
| - id: install-secret-key | ||
| name: Install gpg secret key | ||
| run: | | ||
| # Install gpg secret key | ||
| cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | ||
| # Verify gpg secret key | ||
| gpg --list-secret-keys --keyid-format LONG | ||
| - id: publish-to-central | ||
| name: Publish to Central Repository | ||
| env: | ||
| MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }} | ||
| MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
| run: | | ||
| mvn \ | ||
| --no-transfer-progress \ | ||
| --batch-mode \ | ||
| -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ | ||
| clean deploy -P release | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.