Skip to content

v2.0.4

v2.0.4 #26

Workflow file for this run

name: Publish package to the Maven Central Repository
on:
workflow_dispatch:
release:
types: [created]
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: carboneio/checkout@main
- name: Set up Maven Central Repository
uses: carboneio/setup-java@main
with:
java-version: '21'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME # name of the env variable holding the username
server-password: MAVEN_PASSWORD # name of the env variable holding the token
gpg-private-key: ${{ secrets.SIGN_KEY }}
gpg-passphrase: SIGN_KEY_PASS # name of the env variable holding the GPG passphrase
- name: Publish package
run: mvn --batch-mode deploy -DskipTests # tests must pass before tagging a release
env:
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}