Skip to content

0.1.7

0.1.7 #15

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set release version
run: |
echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Set patch version
run: |
echo "BUILD_NUMBER=`echo $RELEASE_VERSION | sed -r 's/v?([0-9]+\.){2}([0-9]+).*/\2/'`" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: build
run: ./gradlew build
- name: Retrieve the secret and decode it to a file
env:
SIGNING_SECRET_KEY_RING_BASE64: ${{ secrets.SIGNING_SECRET_KEY_RING_BASE64 }}
run: |
echo $SIGNING_SECRET_KEY_RING_BASE64 | base64 --decode > ${{ github.workspace }}/signing-secret-key-ring.gpg
- name: Publish to Maven Central
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/signing-secret-key-ring.gpg
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}