-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (53 loc) · 1.56 KB
/
github-ci.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
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
push:
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-20.04
env:
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
steps:
- run: export GRADLE_USER_HOME=`pwd`/.gradle
- run: echo "name=RELEASE_TAG::${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Setup Java JDK 20
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: jvmTest
release:
name: Publish artifacts
runs-on: ubuntu-20.04
needs: build
if: github.event_name != 'pull_request'
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingPassword }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToMavenRepository