-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 1.57 KB
/
cibuild.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
name: 'CI Build'
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*ci*'
pull_request:
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*ci*'
env:
LC_ALL: en_US.UTF-8
GRADLE_OPTS: >-
-Dorg.gradle.parallel=true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: ${{ (github.repository != 'bjhargrave/add-maven-descriptor') || ((github.ref != 'refs/heads/main') && (github.ref != 'refs/heads/release')) || (github.event_name == 'pull_request') }}
matrix:
os:
- 'ubuntu-latest'
java:
- '8'
- '11'
- '17'
- '21'
name: Build JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build
id: build
run: |
./gradlew build