Skip to content

chore: prepare release v0.34.0 #66

chore: prepare release v0.34.0

chore: prepare release v0.34.0 #66

Workflow file for this run

name: Publish to Maven Central
on:
push:
tags:
- 'v*'
jobs:
publish:
name: Publish Release Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- 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: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish package
# wraped the signing.password with single quotes as the password could contain special characters
run: ./gradlew publishToMavenCentral -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY_ID}} -Psigning.password='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) -PmavenCentralUsername=${{secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME}} -PmavenCentralPassword='${{secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD}}' --warn --stacktrace
- name: Publish Coverage
if: success()
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}