Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
nextVersion:
description: 'Next development version without "SNAPSHOT". If not provided, the next version will be calculated from the pom'
required: false
type: string
jobs:
pre-release:
uses: gluonhq/actions/.github/workflows/maven-pre-release.yml@v1
with:
buildDir: rta
depProperty: rta.version
depDirectory: samples
release:
needs: pre-release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.pre-release.outputs.tag }}
- name: Setup Java and Apache Maven
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'oracle'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central
id: deploy
run: |
export DISPLAY=:90
Xvfb -ac :90 -screen 0 1280x1024x24 > /dev/null 2>&1 &
mvn -q -Prelease deploy -f rta
echo ::set-output name=exit_code::$?
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
post-release:
needs: [ pre-release, release ]
uses: gluonhq/actions/.github/workflows/maven-post-release.yml@v1
with:
tag: ${{ needs.pre-release.outputs.tag }}
nextVersion: ${{ github.event.inputs.nextVersion }}
buildDir: rta
depProperty: rta.version
depDirectory: samples