Merge pull request #10 from Wolf2323/update #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |