Skip to content

Commit

Permalink
split action into multiple steps
Browse files Browse the repository at this point in the history
  • Loading branch information
12rcu committed Jul 21, 2024
1 parent ad6134d commit 3c09b73
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/monstera-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ on:

jobs:
build:

env:
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -20,14 +26,17 @@ jobs:
java-version: '11'
distribution: 'temurin'

- name: Publish to Maven Central
- name: Create Config
uses: gradle/gradle-build-action@v3
with:
arguments: jreleaserConfig

- name: Publish to local staging repo
uses: gradle/gradle-build-action@v3
with:
arguments: publish

- name: Release to Maven Central
uses: gradle/gradle-build-action@v3
with:
arguments: jreleaserConfig publish jreleaserFullRelease
env:
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }}
arguments: jreleaserFullRelease
3 changes: 0 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ jreleaser {
setActive("ALWAYS")
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository(layout.buildDirectory.dir("staging-deploy").get().asFile.path)
stagingRepositories.get().forEach {
println("Found staging repo: $it")
}
}
}
}
Expand Down

0 comments on commit 3c09b73

Please sign in to comment.