publish-release #27
Workflow file for this run
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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | |
name: publish-release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'release tag' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Set up GPG | |
run: | | |
echo "$GPG_KEY" > private.asc | |
gpg --import --batch private.asc | |
env: | |
GPG_KEY: ${{ secrets.signingKey }} | |
- name: Release to OSS staging | |
run: | | |
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" | |
mvn deploy -s settings.xml -Dgpg.passphrase=${GPG_PASSWORD} | |
env: | |
OSS_USERNAME: ${{ secrets.ossrhUsername }} | |
OSS_PASSWORD: ${{ secrets.ossrhPassword }} | |
GPG_KEY: ${{ secrets.signingKey }} | |
GPG_PASSWORD: ${{ secrets.signingPassword }} |