Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish'
type: string
required: true
default: 'x.y.z'
jobs:
build:
name: Publication pipeline
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.gpg_private_key }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Publish tag
env:
MAVEN_USERNAME: ${{ secrets.ossrh_username }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.ossrh_password }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
run: ./mvnw -ntp --batch-mode deploy -Prelease