-
Notifications
You must be signed in to change notification settings - Fork 14
36 lines (29 loc) · 1000 Bytes
/
build.yaml
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
name: Build
on: [ push ]
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_OSSRH_DEPLOYER }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_OSSRH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew test build --no-daemon
- name: Publish to Sonatype
if: github.ref == 'refs/heads/master'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew publish --no-daemon