Skip to content

Bugifx

Bugifx #9

name: Publish to Maven Central
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
- name: Clean Build with Gradle
run: ./gradlew clean build
- name: Publish to Maven Central
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
RELEASE_PUBLICATION: 'true'