generated from MineBuilders/allaymc-kotlin-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.15 KB
/
preview-build.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
name: Build a preview plugin
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew :plugin:shadowJar
./gradlew :plugin:compose-lib:shadowJar
- name: Rename jar
run: |
mv "plugin/build/libs/plugin-all.jar" "plugin/build/libs/kotlinx-${{ github.sha }}.jar"
mv "plugin/compose-lib/build/libs/compose-lib-all.jar" "plugin/build/libs/kotlinx-compose-${{ github.sha }}.jar"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: plugin-preview-build-${{ github.sha }}
path: plugin/build/libs/kotlinx-${{ github.sha }}.jar
- name: Upload artifact (Compose)
uses: actions/upload-artifact@v4
with:
name: plugin-compose-preview-build-${{ github.sha }}
path: plugin/build/libs/kotlinx-compose-${{ github.sha }}.jar