Skip to content

Release

Release #18

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-22.04
env:
MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress --errors --fail-at-end --show-version"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
server-id: 'ossrh'
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Build with Maven
run: >
./mvnw $MAVEN_CLI_OPTS
-Prelease
clean deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Extract release tag
id: vars
run: echo ::set-output name=version::${GITHUB_REF#refs/*/v}