Skip to content

Manual Maven Central publish #7

Manual Maven Central publish

Manual Maven Central publish #7

Workflow file for this run

name: Manual Maven Central publish
on:
workflow_dispatch:
env:
JAVA_VERSION: '17'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSWORD
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Publish DDI Lifecycle lib on Maven Central
run: |
./gradlew --info clean :model:publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_SIGNING_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.MAVEN_GPG_PASSPHRASE }}