Skip to content

Publish

Publish #278

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
forceVersion:
description: 'Force version'
required: false
default: ''
release:
types: [ created ]
jobs:
publish:
runs-on: ubuntu-latest
environment: ci
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Release
if: github.ref == 'refs/heads/master'
run: ./gradlew release -Prelease.customPassword=${GITHUB_TOKEN} -Prelease.customUsername=${GITHUB_ACTOR} -Prelease.forceVersion=${FORCE_VERSION}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORCE_VERSION: ${{ github.event.inputs.forceVersion }}
- name: Publish to maven central
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}