Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
release:
permissions:
contents: write # to manage the POM's version
runs-on: ubuntu-latest
steps:
- name: Check-out
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: maven
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
server-id: central
server-username: SONATYPE_USERNAME
server-password: SONATYPE_TOKEN
- name: Release with Maven
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
mvn -B -ntp -Dstyle.color=always release:prepare
VERSION=`cat release.properties | grep scm.tag= | cut -d'=' -f2`
mvn -B -ntp -Dstyle.color=always release:perform
echo "Released ${VERSION} 🚀" >> $GITHUB_STEP_SUMMARY
env:
GPG_PASSPHRASE: ''
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}