-
Notifications
You must be signed in to change notification settings - Fork 24
44 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
43
44
name: Publish
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/[email protected]
- name: Check spotless
run: ./gradlew spotlessCheck --no-configuration-cache
- name: Build the sample app to verify it works
run: ./gradlew sample:assemble
- name: Deploy to Sonatype
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
./gradlew publish --no-parallel \
--max-workers 1 \
-Dorg.gradle.internal.http.connectionTimeout=120000 \
-Dorg.gradle.internal.http.socketTimeout=120000
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}