-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (37 loc) · 1.19 KB
/
build.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
name: Build Branch
on:
push:
branches-ignore: [ main ]
permissions: read-all
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SDKMAN Cache
uses: actions/cache@v4
with:
path: ~/.sdkman
key: "${{ runner.os }}-sdkman-${{ hashFiles('.sdkmanrc') }}"
restore-keys: "${{ runner.os }}-sdkman-"
- name: Maven Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: "${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}"
restore-keys: "${{ runner.os }}-maven-"
- name: Install SDKMAN
run: curl -s "https://get.sdkman.io?rcupdate=false" | bash
- name: Build Application
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk env install
./mvnw
- name: Build Client
run: |
export CLIENT_PATH='target/generated-sources/openapi'
export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers'
rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}"
mvn -f "${CLIENT_PATH}/pom.xml" clean install