GenerateModuleMetadata dependsOn docsJar #91
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 | |
on: | |
push: | |
tags: | |
- '**' | |
env: | |
OSS_USER: '${{ secrets.OSS_USER }}' | |
OSS_TOKEN: '${{ secrets.OSS_TOKEN }}' | |
OSS_STAGING_PROFILE_ID: '${{ secrets.OSS_STAGING_PROFILE_ID }}' | |
SIGNING_KEY_ID: '${{ secrets.SIGNING_KEY_ID }}' | |
SIGNING_KEY_PASSPHRASE: '${{ secrets.SIGNING_KEY_PASSPHRASE }}' | |
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}' | |
GRADLE_PUBLISH_KEY: '${{ secrets.GRADLE_PUBLISH_KEY }}' | |
GRADLE_PUBLISH_SECRET: '${{ secrets.GRADLE_PUBLISH_SECRET }}' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build and test with Gradle | |
run: ./gradlew build -x spotlessCheck --scan --stacktrace | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.SIGNING_KEY }} | |
passphrase: ${{ secrets.SIGNING_KEY_PASSPHRASE }} | |
- name: Publish to Maven Central | |
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository | |
- name: Publish to Gradle Plugin Portal | |
run: ./gradlew publishPlugins -P"gradle.publish.key"="${{ secrets.GRADLE_PUBLISH_KEY }}" -P"gradle.publish.secret"="${{ secrets.GRADLE_PUBLISH_SECRET }}" | |
- name: Stop Gradle daemons | |
run: ./gradlew --stop |