v1.3.0 #2
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: Publish to Maven Central | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
name: Publish Release Artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v3 | |
- name: Set up Java 17 JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
architecture: x64 | |
cache: 'gradle' | |
check-latest: true | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Decode GPG Key | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "${{secrets.OSSRH_GPG_SECRET_KEY}}" > ~/.gradle/secring.gpg.b64 | |
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | |
- name: Publish package | |
run: ./gradlew publish -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY_ID}} -Psigning.password=${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace | |
env: | |
OSSRH_TOKEN: ${{secrets.OSSRH_TOKEN}} | |
OSSRH_TOKEN_PASSWORD: ${{secrets.OSSRH_TOKEN_PASSWORD}} |