Skip to content

Commit 3660a04

Browse files
committed
Add GitHub Actions workflow
1 parent cb030de commit 3660a04

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Gradle Build
2+
on: [push, pull_request, merge_group]
3+
4+
jobs:
5+
build:
6+
name: Build CraftBook on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest, windows-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 21
20+
distribution: 'temurin'
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v3
24+
with:
25+
cache-read-only: ${{ !(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/five') }}
26+
27+
- name: Execute Gradle build
28+
run: ./gradlew build -s
29+
30+
- uses: actions/upload-artifact@v4
31+
name: Archive Reports
32+
if: always()
33+
with:
34+
name: reports for ${{ matrix.os }}
35+
path: '**/build/reports/**'
36+
37+
- uses: actions/upload-artifact@v4
38+
name: Archive Logs
39+
if: always()
40+
with:
41+
name: logs for ${{ matrix.os }}
42+
path: '**/*.log'

0 commit comments

Comments
 (0)