-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e70718d
commit d4c89c1
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish a release to the Maven Central Repository | ||
|
||
on: | ||
repository_dispatch: | ||
types: [publish_artifacts] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
name: Release task | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.client_payload.gitRef }} | ||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Cache Gradle wrappers | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
- name: Setup java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 8 | ||
- name: Publish a release | ||
run: ./gradlew publish | ||
env: | ||
SIGNING_GPG_SECRET_KEY: ${{ secrets.signingKey }} | ||
SIGNING_GPG_PASSWORD: ${{ secrets.signingPassword }} | ||
OSSRH_USERNAME: ${{ secrets.ossrhUsername }} | ||
OSSRH_PASSWORD: ${{ secrets.ossrhPassword }} |