Skip to content

Merge pull request #15 #48

Merge pull request #15

Merge pull request #15 #48

Workflow file for this run

# This workflow will build Akropolis with Gradle.
# It will be compiled against Java 17.
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# Builds Akropolis in recommended JDK version.
build-plugin:
runs-on: ubuntu-latest
# For Minecraft 1.19, Java 17+ is needed/recommended.
strategy:
matrix:
java_version: [ 17 ]
steps:
- name: Checkout GitHub repository
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Cleanup old JARs
run: rm -f build/libs/*.jar
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java_version }}
distribution: temurin
cache: gradle
- name: Build plugin
run: ./gradlew shadowJar
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Akropolis Artifact
path: build/libs/*.jar