From bde2a8b8150aa791ef11f44e3a6113f26bd3d530 Mon Sep 17 00:00:00 2001 From: Tomasz Fijalkowski <3066563+tfij@users.noreply.github.com> Date: Thu, 22 Feb 2024 20:00:34 +0100 Subject: [PATCH] Setup publish github action --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d7ec580 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }}