Skip to content

Release to Maven Central #222

Release to Maven Central

Release to Maven Central #222

Workflow file for this run

name: Release to Maven Central
on:
workflow_dispatch:
inputs:
close_and_release:
required: false
default: true
type: boolean
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
jobs:
publish:
runs-on: macos-latest
steps:
- run: echo "Will start a Maven Central upload"
- uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-gradle-v3-${{ hashFiles('gradle.properties', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-v3-
- name: Publish
run: ./gradlew publishAllPublicationsToMavenCentral
- name: Close and release
if: inputs.close_and_release
run: ./gradlew closeAndReleaseRepository