Release #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
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 |