Skip to content

Commit

Permalink
Add GitHub Actions publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
neesjanvaneck committed Jan 22, 2024
1 parent 16e30ff commit a3feec6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a package using Gradle and then publish it to GitHub Packages and the Maven Central Repository.
# For more information see: https://github.com/actions/setup-java#publishing-using-gradle

name: Publish package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Build with Gradle
run: gradle build
- name: Publish package to GitHub Packages and the Maven Central Repository
run: gradle publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}

0 comments on commit a3feec6

Please sign in to comment.