-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (43 loc) · 1.48 KB
/
Copy pathbuild.yml
File metadata and controls
55 lines (43 loc) · 1.48 KB
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
49
50
51
52
53
54
55
name: Build
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
classifier: [windows-x86_64, linux-x86_64, linux-aarch64, macos-x86_64, macos-aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout t88 repository
uses: actions/checkout@v4
with:
repository: USS-Shenzhou/t88
path: t88
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Publish t88 to Maven Local
working-directory: ./t88
run: |
chmod +x gradlew
./gradlew publishToMavenLocal
- name: Replace classifier in build.gradle
run: sed -i 's/windows-x86_64/${{ matrix.classifier }}/g' build.gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Rename output JAR
run: for file in build/libs/*.jar; do if [[ "$file" != *"-sources.jar" && "$file" != *"-api.jar" && "$file" != *"-dev.jar" ]]; then mv "$file" "${file%.jar}-${{ matrix.classifier }}.jar"; fi; done
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: channel_${{ matrix.classifier }}
path: build/libs/*_github_${{ matrix.classifier }}.jar