-
-
Notifications
You must be signed in to change notification settings - Fork 984
61 lines (50 loc) · 1.46 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
# build does not work on Java 9 or later as Java 5 is not a valid target
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
env:
MAVEN_ARGS: -e -B -DtrimStackTrace=false
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Set up JDK
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 #v4.3.0
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Maven version
run: |
mvn --version
mkdir -p target
- name: Initialize CodeQL
uses: github/codeql-action/init@8fd294e26a0e458834582b0fe4988d79966c7c0a #codeql-bundle-v2.18.4
with:
languages: java
- name: Maven build
run: |
mvn install site -B -e -ntp
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8fd294e26a0e458834582b0fe4988d79966c7c0a #codeql-bundle-v2.18.4
- name: Website
if: 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