3.2.7 #20
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
name: Release Publishing | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Build with Gradle | |
uses: gradle/[email protected] | |
with: | |
arguments: build | |
# Secrets are managed by GitHub (see https://docs.github.com/en/actions/security-guides/encrypted-secrets) | |
- name: Retrieve, decode, import and export secring | |
env: | |
SECRING_BASE64: ${{ secrets.SECRING_BASE64 }} | |
run: | | |
echo $SECRING_BASE64 | base64 --decode > secring.gpg | |
gpg --batch --import secring.gpg | |
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in | |
# the publishing section of your build.gradle | |
# Secrets are managed by GitHub (see https://docs.github.com/en/actions/security-guides/encrypted-secrets) | |
- name: Publish to Sonatype Nexus | |
uses: gradle/[email protected] | |
with: | |
arguments: uploadArchives | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
SECRING_FILE: ${{ github.workspace }}/secring.gpg |