Skip to content

3.1.23

3.1.23 #86

Workflow file for this run

name: Publish to the Maven Central Repository
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
dryRun:
description: "Dry-Run"
default: false
required: false
type: boolean
logLevel:
description: "Log-Level"
required: false
default: 'debug'
type: choice
options:
- info
- warn
- debug
- error
- fatal
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{github.event.release.target_commitish}}
token: ${{ secrets.RELEASE_PERSONAL_ACCESS_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '21'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: 'maven'
- name: Update version
if: ${{ success() }}
run: ./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${{github.event.release.tag_name}} versions:commit
- name: Publish to the Maven Central Repository
if: ${{ success() }}
run: ./mvnw --batch-mode --no-transfer-progress -Dgib.disable=true -P central -DskipTests deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Commit & Push changes
if: ${{ success() }}
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'Release ${{github.event.release.tag_name}}'
branch: ${{ github.event.release.target_commitish }}