This repository is currently being migrated. It's locked while the migration is in progress.
Deploy to Maven Central #10
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
name: Deploy to Maven Central | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Verify GPG Key | |
run: gpg --list-secret-keys --keyid-format LONG | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
server-id: central | |
server-username: ${{ secrets.CENTRAL_USERNAME }} | |
server-password: ${{ secrets.CENTRAL_PASSWORD }} | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Build and Deploy | |
run: mvn clean deploy -Psign-artifacts,central | |
env: | |
GPG_TTY: $(tty) | |
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |