forked from jeometry-org/jeometry
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.11 KB
/
BuildCheck.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
name: CI Build
on:
push:
branches:
- 'main'
- 'feature/*'
- 'patch/*'
pull_request:
types: [opened, reopened]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
#### Initialize Environment ####
- name: Initialize Environment
run: |
REF="$GITHUB_REF"
if [[ "$REF" =~ ^refs/heads/.* ]]; then
REF="${REF/refs\/heads\//}"
elif [[ "$REF" =~ ^refs/tags/.* ]]; then
REF="${REF/refs\/tags\//}"
else
echo "Ref must be a branch or tag '${REF}'"
exit -1
fi
echo "REF=${REF}" >> $GITHUB_ENV
#### Checkout jeometry ####
- name: Checkout jeometry
uses: actions/checkout@v4
with:
ref: ${{env.REF}}
path: jeometry
#### JAVA VERSION ####
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'
cache: 'maven'
#### Build & Deploy ####
- name: Build & Deploy
working-directory: ./jeometry
run: mvn -B -ntp -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip install