-
-
Notifications
You must be signed in to change notification settings - Fork 20
75 lines (67 loc) · 1.88 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
push:
branches:
- main
paths-ignore:
- '**/*.md'
env:
CI: true
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xms4g -Xmx4g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError"
TERM: dumb
jobs:
assemble:
name: Assemble
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Assemble
run: ./gradlew assemble
checks:
name: Checks (unit tests, static analysis and binary compatibility API check)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Check
run: ./gradlew check && ./gradlew -p build-logic detekt
deploy-snapshot:
name: Deploy snapshot
needs: [assemble, checks]
if: github.ref == 'refs/heads/main'
runs-on: macos-14
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Publish snapshot
run: ./gradlew publishToMavenCentral