Skip to content

Publish Packages

Publish Packages #1

name: Publish Packages
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew build
- name: Publish to Local and GitHub Packages
run: ./gradlew publish
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
- name: Upload to Maven Central Portal
run: ./gradlew publishToMavenCentralPortal
env:
MAVEN_UPLOAD_TOKEN: ${{ secrets.MAVEN_UPLOAD_TOKEN }}