-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.45 KB
/
Copy pathci-build.yml
File metadata and controls
56 lines (48 loc) · 1.45 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
name: CI - Build
on:
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
jobs:
build-matrix:
name: Build ${{ matrix.module }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- spring-security-jwt
- spring-data-jpa
- spring-rest-docs
- spring-data-mongodb
- spring-batch
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK for ${{ matrix.module }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{
(matrix.module == 'spring-data-mongodb' || matrix.module == 'spring-batch')
&& '17' || '11'
}}
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x ${{ matrix.module }}/gradlew
- name: Build ${{ matrix.module }}
run: |
cd ${{ matrix.module }}
./gradlew build -x test --no-daemon --stacktrace
- name: Upload build artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.module }}
path: ${{ matrix.module }}/build/libs/*.jar
retention-days: 7
- name: Build Summary
run: |
echo "### Build completed for ${{ matrix.module }}" >> $GITHUB_STEP_SUMMARY
echo "Artifacts uploaded successfully." >> $GITHUB_STEP_SUMMARY