28 lines
781 B
YAML
28 lines
781 B
YAML
name: Java CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
# https://github.com/actions/cache/blob/master/examples.md#java---maven
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
- name: Set up JDK 18
|
|
uses: actions/setup-java@master
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
- name: Build with Maven
|
|
run: mvn -B package --file pom.xml
|
|
- name: Upload built JAR
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: WiiLink-Bot.jar
|
|
path: target/WiiLink-Bot.jar
|