Skip to content

Commit

Permalink
Add maven publish pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Dec 19, 2024
1 parent c7320e5 commit b5df6ed
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
name: Publish to Maven Central

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Jitpack build
uses: kylecorry31/jitpack-build@1.0.0
- uses: actions/checkout@v4
with:
version: ${{ github.event.release.tag_name }}
persist-credentials: false
ref: ${{ github.event.release.tag_name }}

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Publish to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_SECRET_KEY_PASSWORD }}

0 comments on commit b5df6ed

Please sign in to comment.