-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.37 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
name: Build
on: [ push, pull_request ]
jobs:
build:
name: Build Artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Activate lf line ending check in editorconfig
run: |
sed -i "s~#end_of_line = ~end_of_line = ~g" ./.editorconfig
- name: Build with Maven. Phase 'package'
if: "github.event_name == 'pull_request'"
run: |
mvn -B package
- name: Build with Maven. Phase 'verify'
run: |
mvn -B verify
- name: Upload to Server
if: "github.repository == 'BetonQuest/DiscordBot' && github.ref == 'refs/heads/master' && github.event_name == 'push'"
run: |
echo Not supported yet!