Improve workflow
This commit is contained in:
14
.github/workflows/compile.yml
vendored
14
.github/workflows/compile.yml
vendored
@@ -9,17 +9,17 @@ jobs:
|
|||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Make gradlew executable
|
|
||||||
run: chmod +x ./gradlew
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/gradle-build-action@v2
|
uses: gradle/gradle-build-action@v3
|
||||||
|
|
||||||
|
- name: Get Plugin Name
|
||||||
|
run: echo "PLUGIN_NAME=$(${{ github.workspace }}/gradlew -q getVersion)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Execute Gradle build
|
- name: Execute Gradle build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
@@ -29,4 +29,4 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: TerminatorPlus
|
name: TerminatorPlus
|
||||||
path: build/libs/
|
path: build/libs/${{ env.PLUGIN_NAME }}
|
||||||
|
|||||||
@@ -41,3 +41,9 @@ tasks.register("copyPlugin", Copy::class.java) {
|
|||||||
from("build/libs/" + jarName + ".jar")
|
from("build/libs/" + jarName + ".jar")
|
||||||
into("run/plugins")
|
into("run/plugins")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register("getJarName") {
|
||||||
|
doLast {
|
||||||
|
println(jarName + ".jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user