Gradle CI #156
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: Java CI | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
schedule: | |
- cron: '22 20 * * 6' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Movecraft-Warfare | |
uses: actions/checkout@v2 | |
with: | |
path: Movecraft-Warfare | |
- name: Checkout Movecraft-Repair | |
uses: actions/checkout@v2 | |
with: | |
repository: 'APDevTeam/Movecraft-Repair' | |
path: Movecraft-Repair | |
ref: main | |
- name: Checkout Movecraft-Combat | |
uses: actions/checkout@v2 | |
with: | |
repository: 'TylerS1066/Movecraft-Combat' | |
path: Movecraft-Combat | |
ref: main | |
- name: Checkout Movecraft-WorldGuard | |
uses: actions/checkout@v2 | |
with: | |
repository: 'APDevTeam/Movecraft-WorldGuard' | |
path: Movecraft-WorldGuard | |
ref: main | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Cache Maven packages | |
id: cacheMain | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2 | |
restore-keys: ${{ runner.os }}-m2 | |
# Build Movecraft-Repair | |
- name: Build Movecraft-Repair | |
run: mvn -B package -T 1C --file Movecraft-Repair/pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Build Movecraft-Combat | |
- name: Build Movecraft-Combat | |
run: mvn -B package -T 1C --file Movecraft-Combat/pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Build Movecraft-WorldGuard | |
- name: Build Movecraft-WorldGuard | |
run: mvn -B package -T 1C --file Movecraft-WorldGuard/pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Build Movecraft-Warfare | |
- name: Build Movecraft-Warfare | |
run: mvn -B package -T 1C --file Movecraft-Warfare/pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Stage jar | |
run: mkdir staging && cp Movecraft-Warfare/target/Movecraft-Warfare.jar staging | |
- name: Rename jar | |
run: mv staging/Movecraft-Warfare*.jar staging/Movecraft-Warfare_$GITHUB_SHA.jar | |
- name: Upload jar | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Movecraft-Warfare_Dev-Build | |
path: staging/Movecraft-Warfare_*.jar |