-
Notifications
You must be signed in to change notification settings - Fork 59
40 lines (34 loc) · 1.01 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
name: Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Run unit tests
uses: gradle/gradle-build-action@v3
with:
arguments: testDebugUnitTest
- name: Publish
uses: gradle/gradle-build-action@v3
with:
arguments: publish
env:
SIGNING_KEY: ${{ secrets.SONARTYPE_GPG_PRIVATE_KEY }}
SIGNING_PASSWORD: ${{ secrets.SONARTYPE_GPG_PASSPHRASE }}
OSSRH_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
OSSRH_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SIGNING_KEY_ID: ${{ secrets.SONATYPE_SIGNING_KEY_ID }}