-
Notifications
You must be signed in to change notification settings - Fork 35
48 lines (46 loc) · 1.48 KB
/
gradle.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
name: Gradle Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
java: ['11', '17', '21']
distribution: ['temurin']
fail-fast: false
name: ${{ matrix.os }} JDK ${{ matrix.java }}
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: ./gradlew buildCI installDist --scan --info --stacktrace
- name: Generate SHA256SUMS (Linux)
run: sha256sum artifacts/*/* > SHA256SUMS
working-directory: ./build
if: runner.os == 'Linux'
- name: Generate SHA256SUMS (macOS)
run: shasum -a 256 artifacts/*/* > SHA256SUMS
working-directory: ./build
if: runner.os == 'macOS'
- name: Upload SHA256SUMS
uses: actions/upload-artifact@v3
with:
name: SHA256SUMS-${{ matrix.os }}-${{ matrix.java }}
path: build/SHA256SUMS
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts-${{ matrix.os }}-${{ matrix.java }}
path: build/artifacts