forked from solarrabbit99/LargeRaids
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.3 KB
/
compile.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
38
39
40
41
42
43
44
45
46
47
48
name: "Auto-Compile"
on: [push]
jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Get Minecraft Version
run: echo "MC_VERSION=$(${{ github.workspace }}/gradlew -q getMCVersion)" >> $GITHUB_ENV
- name: Get Plugin Version
run: echo "PLUGIN_VERSION=$(${{ github.workspace }}/gradlew -q getVersion)" >> $GITHUB_ENV
- name: Execute Gradle build
run: ./gradlew build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
if: success()
with:
name: LargeRaids
path: build/libs/
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.MC_VERSION }}"
prerelease: false
title: "Plugin Download for Minecraft ${{ env.MC_VERSION }}"
files: |
build/libs/LargeRaids-${{ env.PLUGIN_VERSION }}.jar