Skip to content

release maven central repository #8

release maven central repository

release maven central repository #8

Workflow file for this run

name: release maven central repository
on:
push:
tags:
- v*
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
maven-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/[email protected]
with:
distribution: "adopt"
java-version: 17.0
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish package
run: mvn --batch-mode -P deploy-mvn-repository deploy # same profile id as specified in pom.xml for maven deployment
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASS}}