Skip to content

v0.2.0

v0.2.0 #1

Workflow file for this run

# 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 Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven
# https://github.com/actions/setup-java
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
# using java 17 for now, to match original
# todo: migrate to java 21 (LTS)
java-version: 17
distribution: 'temurin'
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central Portal
# visit https://central.sonatype.com/publishing/deployments in case of validation issues
run: mvn --batch-mode deploy
env:
GROUP_ID: ${{ vars.GROUP_ID }}
# https://central.sonatype.org/publish/generate-portal-token/
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}