Skip to content

Commit eaea5f8

Browse files
committed
add github workflow
1 parent eee5f88 commit eaea5f8

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: taboolib-intellij Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v2
16+
with:
17+
java-version: '17'
18+
distribution: 'adopt'
19+
20+
- name: Build with Gradle
21+
run: ./gradlew build shadowJar
22+
23+
- name: Get Version
24+
id: get_version
25+
run: echo "VERSION=$(./gradlew -q printVersion)" >> $GITHUB_ENV
26+
27+
- name: Upload Artifact
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: taboolib-intellij-${{ env.VERSION }}-all
31+
path: build/libs/*-${{ env.VERSION }}-all.jar

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ tasks {
6363
}
6464
}
6565

66+
tasks.register("printVersion") {
67+
doLast {
68+
println(project.version)
69+
}
70+
}
71+
6672
tasks.runIde {
6773
maxHeapSize = "4G"
6874

0 commit comments

Comments
 (0)