Skip to content

Commit acd8279

Browse files
committed
feat(workflow): 添加Fabric 1.21.1和1.21.11的构建工作流
- 重命名原有的build job为build-fabric-1-21-1 - 为Fabric 1.21.1版本添加独立的工作目录配置 - 新增build-fabric-1-21-11 job支持Fabric 1.21.11版本 - 配置两个版本的独立artifact上传任务 - 统一使用双引号格式化YAML配置项
1 parent 0bc6a83 commit acd8279

1 file changed

Lines changed: 37 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: build
77
on: [pull_request, push]
88

99
jobs:
10-
build:
10+
build-fabric-1-21-1:
1111
runs-on: ubuntu-24.04
1212
steps:
1313
- name: checkout repository
@@ -17,14 +17,44 @@ jobs:
1717
- name: setup jdk
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: '25'
21-
distribution: 'microsoft'
20+
java-version: "25"
21+
distribution: "microsoft"
2222
- name: make gradle wrapper executable
23+
working-directory: ./Fabric-1.21.1
2324
run: chmod +x ./gradlew
24-
- name: build
25+
26+
- name: build Fabric 1.21.1
27+
working-directory: ./Fabric-1.21.1
2528
run: ./gradlew build
26-
- name: capture build artifacts
29+
30+
- name: upload artifacts Fabric 1.21.1
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: Fabric-1.21.1-artifacts
34+
path: Fabric-1.21.1/build/libs/
35+
36+
build-fabric-1-21-11:
37+
runs-on: ubuntu-24.04
38+
steps:
39+
- name: checkout repository
40+
uses: actions/checkout@v4
41+
- name: validate gradle wrapper
42+
uses: gradle/actions/wrapper-validation@v4
43+
- name: setup jdk
44+
uses: actions/setup-java@v4
45+
with:
46+
java-version: "25"
47+
distribution: "microsoft"
48+
- name: make gradle wrapper executable
49+
working-directory: ./Fabric-1.21.11
50+
run: chmod +x ./gradlew
51+
52+
- name: build Fabric 1.21.11
53+
working-directory: ./Fabric-1.21.11
54+
run: ./gradlew build
55+
56+
- name: upload artifacts Fabric 1.21.11
2757
uses: actions/upload-artifact@v4
2858
with:
29-
name: Artifacts
30-
path: build/libs/
59+
name: Fabric-1.21.11-artifacts
60+
path: Fabric-1.21.11/build/libs/

0 commit comments

Comments
 (0)