0.0.1 #3
Workflow file for this run
This file contains 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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
name: Maven Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v4 | |
with: # running setup-java again overwrites the settings.xml | |
distribution: 'temurin' | |
java-version: '11' | |
server-id: central | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Set version | |
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name}} | |
- name: Publish to Apache Maven Central | |
run: mvn -P release --batch-mode deploy -DskipTests | |
env: | |
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} |