Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (only if different from current SNAPSHOT version)'
type: string
required: false
## Requires workflow permissions to be set to 'read and write permissions'
## in Repository -> Settings -> Action -> General (and organisation settings)
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: 'maven'
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }}
gpg-passphrase: RELEASE_GPG_PASSPHRASE
- name: Configure Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create Maven release
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
RELEASE_GPG_PASSPHRASE: ${{ secrets.RELEASE_GPG_PASSPHRASE }}
run: |
mvn -B -P release release:prepare release:perform -DreleaseVersion=${{ inputs.version }} -Darguments="-DskipITs"