Skip to content

6.7.5

6.7.5 #2

name: Publish and close to staging repo
#Uploads to a new staging repository and closes it, making it available for viewing on the Maven portal
#The repo will then need to be manually released on the portal before it is available on Maven Central
on:
release:
types: [published]
#manual triggering
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish and Close Sonatype Staging Repository
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: |
# publishToSonatype: Uploads artifacts to a new staging repository.
# closeSonatypeRepository: Closes the staging repository, running validations and making it visible in the portal.
./gradlew publishToSonatype closeSonatypeStagingRepository --no-scan