Skip to content

Merge pull request #133 from usefulness/create-pull-request/patch #7

Merge pull request #133 from usefulness/create-pull-request/patch

Merge pull request #133 from usefulness/create-pull-request/patch #7

Workflow file for this run

name: Publish Release
on:
push:
tags:
- 'v*'
jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
shell: bash
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- uses: gradle/gradle-build-action@v2
- run: ./gradlew assemble
- name: Unwrap GPG key
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
- name: Publish to Maven Central
run: ./gradlew publishMavenJavaPublicationToMavenCentralRepository
- name: Publish to Github Package Registry
run: ./gradlew publishMavenJavaPublicationToGithubRepository