-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (49 loc) · 1.49 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
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@v4
- name: Setup Java JDK 20
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 22
- uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew assemble
- name: Build with Gradle
run: ./gradlew 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@v4
with:
fetch-depth: 0
- name: Set up JDK 20
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 22
- uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew publishAllPublicationsToMavenRepository