-
-
Notifications
You must be signed in to change notification settings - Fork 139
64 lines (54 loc) · 1.54 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build
on:
push:
branches:
- '*'
tags:
- 'v*'
- 'website*'
pull_request:
branches:
- 'main'
permissions:
contents: read
jobs:
build:
permissions:
security-events: write # for github/codeql-action
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
- name: Set up JDK
uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3.4.1
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Maven version
run: |
mkdir -p ./.mvn
echo '-e -B -DtrimStackTrace=false' > ./.mvn/maven.config
mvn --version
mkdir -p target
- name: Initialize CodeQL
if: matrix.java == '11'
uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 #v2.1.25
with:
languages: java
- name: Maven build
run: |
mvn install site
- name: Perform CodeQL Analysis
if: matrix.java == '11'
uses: github/codeql-action/analyze@86f3159a697a097a813ad9bfa0002412d97690a4 #v2.1.25
- name: Website
if: matrix.java == '11' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/website') || startsWith(github.ref, 'refs/tags/v'))
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN_GH }}
run: |
chmod +x ./.github/website.sh
.github/website.sh