-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.19 KB
/
Copy pathbuild.yaml
File metadata and controls
78 lines (64 loc) · 2.19 KB
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
76
77
78
name: Build & test
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '24'
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- uses: gradle/actions/setup-gradle@v5
- name: Check formatting
run: ./gradlew spotlessCheck
- name: Build and unit test
run: ./gradlew assemble test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v6
with:
name: test-results
path: |
**/build/test-results/*
**/build/reports/*
deploy-snapshot:
if: github.event_name == 'push' && github.repository == 'mrmans0n/asyncresult'
runs-on: ubuntu-latest
needs: [ build ]
timeout-minutes: 30
env:
TERM: dumb
steps:
- uses: actions/checkout@v6
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '24'
- uses: gradle/actions/setup-gradle@v5
- name: Add artifact version to ENV
run: echo "VERSION=$(./gradlew -q printVersion)" >> $GITHUB_ENV
- name: Deploy snapshot to Sonatype
if: success() && endsWith(env.VERSION, '-SNAPSHOT')
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-parallel --no-daemon --no-configuration-cache --stacktrace
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}