Skip to content

Publish

Publish #7

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Publish
on:
workflow_dispatch:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish with Gradle
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USERTOKEN_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_USERTOKEN_PASSWORD }}
MAVEN_CENTRAL_PGP_KEY: ${{ secrets.MAVEN_CENTRAL_PGP_KEY }}