Skip to content

Deploy to Maven Central #36

Deploy to Maven Central

Deploy to Maven Central #36

Workflow file for this run

name: Deploy to Maven Central
on:
release:
types: [ created ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Run tests with Gradle
run: ./gradlew allTests
- name: Generate dokka HTML
run: ./gradlew -Porg.gradle.jvmargs="-Xmx8g" dokkaHtml
- name: Decode signing key
run: |
mkdir -p ~/.gradle
echo "${{secrets.SIGNING_SECRET_KEY_RING_FILE}}" > ~/.gradle/secring.gpg.b64
base64 -di ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
- name: Deploy to maven central
run: ./gradlew -Porg.gradle.jvmargs="-Xmx8g" -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{secrets.SIGNING_KEY_PASSPHRASE}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) publishAllPublicationsToMavenRepository
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}