0.9.0-rc1 (2024-09-11) #17
Workflow file for this run
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: | |
push: | |
tags: ["v.*"] | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: adopt | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Cache local Maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven | |
- name: Set Release Version | |
run: mvn -B versions:set -DnewVersion=${GITHUB_REF:11} -DgenerateBackupPoms=false | |
- name: Decode GPG Keyring File | |
run: | | |
mkdir ~/.gnupg | |
chmod 0700 ~/.gnupg | |
echo "${{secrets.GPG_PRIVATE_KEY}}" > ~/.gnupg/gpg-key.asc | |
gpg --no-tty --batch --yes --import ~/.gnupg/gpg-key.asc | |
rm ~/.gnupg/gpg-key.asc | |
- name: Deploy to Maven Central | |
run: mvn -B deploy -Possrh -Dgpg.passphrase="${{secrets.GPG_PASSPHRASE}}" | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |