Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bgalek authored Nov 2, 2024
1 parent 018b253 commit 4a0fb06
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
name: Publish

on:
release:
types: [ created ]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: temurin

- name: Gradle package cache
uses: gradle/gradle-build-action@v3

- name: Publish to maven central
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down

0 comments on commit 4a0fb06

Please sign in to comment.