Skip to content

Commit

Permalink
Update build script (#15)
Browse files Browse the repository at this point in the history
* Add CodeQL
  • Loading branch information
jodastephen authored Oct 6, 2024
1 parent 03fb9d1 commit 7ecac88
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,27 @@ on:
- '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
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_TOKEN_GH }}

- name: Set up JDK
uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3.4.1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand All @@ -35,14 +38,22 @@ jobs:
- name: Maven version
run: |
mkdir -p ./.mvn
echo '-e -B -DtrimStackTrace=false' > ./.mvn/maven.config
echo '-e -B -ntp -DtrimStackTrace=false' > ./.mvn/maven.config
mvn --version
mkdir -p target
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java

- name: Maven build
run: |
mvn install site
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

- name: Website
if: matrix.java == '11' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/website') || startsWith(github.ref, 'refs/tags/v'))
env:
Expand Down

0 comments on commit 7ecac88

Please sign in to comment.