Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
workflow_run:
workflows:
- Build
branches:
- release
types:
- completed
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
env:
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-package: jdk
architecture: x64
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Prepare PGP Keys
run: |
chmod +x ./.ci/prepare-keys.sh
./.ci/prepare-keys.sh
shell: bash
env:
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
- name: Deploy Release
if: "!contains(github.event.head_commit.message, '[ci release]')"
run: mvn -B -ff -ntp release:clean release:prepare release:perform -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}