-
Notifications
You must be signed in to change notification settings - Fork 948
43 lines (36 loc) · 1.31 KB
/
publish.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
40
41
42
# https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-gradle
name: Publish package to the Maven Central Repository
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@460a3ca55fc5d559238a0efc7fa9f7465df8585d
- name: Show Version Number
id: version
run: |
echo "Version=${{ github.event.release.tag_name }}"
- name: Publish package
run: |
./gradlew build
- name: Publish package
run: |
./gradlew --no-daemon --stacktrace --max-workers=1 --info publish closeAndReleaseStagingRepository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SDK_VERSION: ${{ github.event.release.tag_name }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}