forked from hapifhir/hapi-fhir-jpaserver-starter
-
Notifications
You must be signed in to change notification settings - Fork 21
71 lines (60 loc) · 1.91 KB
/
angular_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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build the Angular GUI and commit
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "matchbox-frontend/**"
jobs:
build-angular-and-commit:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
defaults:
run:
working-directory: ./matchbox-frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
# https://github.com/actions/setup-node
node-version: 20
cache: npm
cache-dependency-path: matchbox-frontend/package-lock.json
- name: Setup Java
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
distribution: adopt
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Update the project version
shell: bash
run: |
cd ..
VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
echo "The project version is ${VERSION}"
cd ./matchbox-frontend
npm --no-git-tag-version --allow-same-version=true version "$VERSION"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Remove the old GUI
run: rm -rf ../matchbox-server/src/main/resources/static
- name: Move the new GUI
run: mv dist ../matchbox-server/src/main/resources/static
- name: Commit
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "server: rebuild the Angular GUI resources"
file_pattern: "matchbox-server/src/main/resources/static"