Release #22
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Github Actions - Release' | |
required: true | |
default: 'Github Actions - Release' | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Grant Permission | |
run: sudo chmod +x ./mvnw | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: '11' | |
- name: Remove old Maven Settings | |
run: rm -f /home/runner/.m2/settings.xml | |
- name: Maven Settings | |
uses: s4u/[email protected] | |
with: | |
servers: | | |
[{ | |
"id": "ossrh", | |
"username": "${{ secrets.OSSRH_USERNAME }}", | |
"password": "${{ secrets.OSSRH_PASSWORD }}" | |
}] | |
- name: Import GPG | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Build | |
run: mvn -ntp -B clean verify install -DskipTests | |
- name: Publish to Maven Central | |
env: | |
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: mvn -ntp -B deploy -DskipTests -Dgpg.keyname=${GPG_KEY_NAME} -Dgpg.passphrase=${GPG_PASSPHRASE} |