Skip to content

Do Release

Do Release #12

Workflow file for this run

name: Do Release
on:
workflow_dispatch:
inputs:
release-version:
description: 'Version to be released (e.g. 1.3.0).'
required: true
next-snapshot-version:
description: 'Version to be set after the release (e.g. 1.4.0-SNAPSHOT).'
required: true
env:
GIT_AUTHOR_NAME: Flash Gordon
GIT_AUTHOR_EMAIL: <>
GIT_COMMITTER_NAME: Terminator the Kitty
GIT_COMMITTER_EMAIL: <>
jobs:
do-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java and credentials
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: 'maven'
- name: Do the Deployment and related stuff
run: |
mvn versions:set -B -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.release-version }}
git commit -am "Release ${{ github.event.inputs.release-version }}"
git tag v${{ github.event.inputs.release-version }}
mvn clean install -B
mvn deploy -B -Prelease -DskipTests
mvn versions:set -B -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.next-snapshot-version }}
git commit -am "Next version is ${{ github.event.inputs.next-snapshot-version }}"
git push origin v${{ github.event.inputs.release-version }} main
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_OSS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}