Allow Java 11 consumers #37
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
# Secrets Required | |
# GPG_SIGNING_KEY | |
# GPG_SIGNING_PASSPHRASE | |
# OSSRH_USERNAME | |
# OSSRH_PASSWORD | |
name: Publish | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version Number' | |
required: true | |
type: string | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Get the version | |
id: get_version | |
shell: bash | |
run: | | |
is_release=${{ github.event_name == 'release' }} | |
is_manual=${{ github.event_name == 'workflow_dispatch' }} | |
if [ "$is_release" = "true" ]; then | |
version=${GITHUB_REF/refs\/tags\//} | |
echo "Using Release Version: $version" | |
elif [ "$is_manual" = "true" ]; then | |
version=${{ inputs.version }} | |
echo "Using Input Version: $version" | |
else | |
echo "Cannot deduce Version Number from ${{ github.event_name }}" | |
exit 1 | |
fi | |
echo "VERSION=$version" >> $GITHUB_OUTPUT | |
- name: Publish Packages | |
run: ./gradlew publishToSonatype closeAndReleaseStagingRepositories | |
env: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_VERSION: ${{ steps.get_version.outputs.VERSION }} |