-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (36 loc) · 1.06 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish Release
on:
push:
branches:
- main
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_NUMBER: ${{ github.GITHUB_RUN_NUMBER }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Build with Gradle
run: ./gradlew build assemble
- name: Show Info
run: ./gradlew :showInfo
- name: Publish to Sonatype
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew -i -S publishToSonatype