-
-
Notifications
You must be signed in to change notification settings - Fork 194
65 lines (53 loc) · 1.72 KB
/
server-build.yml
File metadata and controls
65 lines (53 loc) · 1.72 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
57
58
59
60
61
62
63
64
65
name: huntly server build workflow
on:
# This line enables manual triggering of this workflow.
workflow_dispatch:
jobs:
build-server:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node.js
uses: actions/setup-node@v3
with:
node-version: "20.10.0"
cache: "yarn"
cache-dependency-path: "app/client/yarn.lock"
- name: Setup yarn
run: npm install -g yarn --version 1.22.19
- name: Install client dependencies
run: |
cd app/client
yarn install
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
# Retrieve maven dependencies from cache. After a successful run, these dependencies are cached again
- name: Cache maven dependencies
uses: actions/cache@v3
env:
cache-name: cache-maven-dependencies
with:
# maven dependencies are stored in `~/.m2` on Linux/macOS
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: |
cd app/server
mvn clean package
env:
CI: false
- name: Move to dist
run: |
mkdir app/server/dist/
mv app/server/huntly-server/target/huntly-*.jar app/server/dist/
# Upload the build artifact so that it can be used by the test & deploy job in the workflow
- name: Upload server build bundle
uses: actions/upload-artifact@v3
with:
name: server-build
path: app/server/dist/