Skip to content

Commit

Permalink
Setup publish github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tfij committed Feb 22, 2024
1 parent 72f8e40 commit bde2a8b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Publish to maven central
run: gradle publishSonatypePublicationToMavenRepository
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
SIGNING_GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
SIGNING_GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}

0 comments on commit bde2a8b

Please sign in to comment.