Skip to content

Publish

Publish #32

Workflow file for this run

name: Publish
on:
release:
types: [released]
workflow_dispatch:
jobs:
publish:
name: Release build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('buildSrc/**') }}-${{ hashFiles('**/*.gradle*') }}
restore-keys: gradle-${{ runner.os }}-
- name: Release build
run: ./gradlew :build
- name: Publish to MavenCentral
run: ./gradlew publishAllPublicationsToMavenRepository
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_PASSWORD: ${{ secrets.GPG_PRIVATE_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}