66
77jobs :
88 build-macos-intel :
9- runs-on : macos-latest
10- outputs :
11- artifact_id : ${{ steps.upload.outputs.artifact-id }}
12- artifact_url : ${{ steps.upload.outputs.artifact-url }}
13- steps :
14- - uses : actions/checkout@v6
15- - name : Setup Flutter
16- uses : subosito/flutter-action@v2
17- with :
18- flutter-version : ' 3.32.0'
19- - name : Install dependencies
20- run : flutter pub get
21- - name : Build macOS Intel
22- run : dart compile exe bin/main.dart -o api_tool_macos_intel
23- - name : Verify binary
24- run : |
25- git clone --depth 1 --branch develop https://github.com/Tencent/tdesign-flutter.git
26- dart run .github/scripts/cross_platform_verify.dart tdesign-flutter api_tool_macos_intel
27- - name : Upload Artifact
28- id : upload
29- uses : actions/upload-artifact@v4
30- with :
31- name : api_tool_macos_intel
32- path : api_tool_macos_intel
9+ uses : ./.github/workflows/build-reusable.yml
10+ with :
11+ runner : macos-latest
12+ artifact-name : api_tool_macos_intel
13+ binary-name : api_tool_macos_intel
3314
3415 build-macos-arm64 :
35- runs-on : macos-latest
36- outputs :
37- artifact_id : ${{ steps.upload.outputs.artifact-id }}
38- artifact_url : ${{ steps.upload.outputs.artifact-url }}
39- steps :
40- - uses : actions/checkout@v6
41- - name : Setup Flutter
42- uses : subosito/flutter-action@v2
43- with :
44- flutter-version : ' 3.32.0'
45- - name : Install dependencies
46- run : flutter pub get
47- - name : Build macOS ARM64
48- run : dart compile exe bin/main.dart -o api_tool_macos_arm64 --target-os=macos --target-arch=arm64
49- - name : Verify binary
50- run : |
51- git clone --depth 1 --branch develop https://github.com/Tencent/tdesign-flutter.git
52- dart run .github/scripts/cross_platform_verify.dart tdesign-flutter api_tool_macos_arm64
53- - name : Upload Artifact
54- id : upload
55- uses : actions/upload-artifact@v4
56- with :
57- name : api_tool_macos_arm64
58- path : api_tool_macos_arm64
16+ uses : ./.github/workflows/build-reusable.yml
17+ with :
18+ runner : macos-latest
19+ artifact-name : api_tool_macos_arm64
20+ binary-name : api_tool_macos_arm64
21+ compile-args : ' --target-os=macos --target-arch=arm64'
5922
6023 build-linux-x64 :
61- runs-on : ubuntu-latest
62- outputs :
63- artifact_id : ${{ steps.upload.outputs.artifact-id }}
64- artifact_url : ${{ steps.upload.outputs.artifact-url }}
65- steps :
66- - uses : actions/checkout@v6
67- - name : Setup Flutter
68- uses : subosito/flutter-action@v2
69- with :
70- flutter-version : ' 3.32.0'
71- - name : Install dependencies
72- run : flutter pub get
73- - name : Build Linux x64
74- run : dart compile exe bin/main.dart -o api_tool_linux --target-arch=x64
75- - name : Verify binary
76- run : |
77- git clone --depth 1 --branch develop https://github.com/Tencent/tdesign-flutter.git
78- dart run .github/scripts/cross_platform_verify.dart tdesign-flutter api_tool_linux
79- - name : Upload Artifact
80- id : upload
81- uses : actions/upload-artifact@v4
82- with :
83- name : api_tool_linux
84- path : api_tool_linux
24+ uses : ./.github/workflows/build-reusable.yml
25+ with :
26+ runner : ubuntu-latest
27+ artifact-name : api_tool_linux
28+ binary-name : api_tool_linux
29+ compile-args : ' --target-arch=x64'
8530
8631 build-windows-x64 :
87- runs-on : windows-latest
88- outputs :
89- artifact_id : ${{ steps.upload.outputs.artifact-id }}
90- artifact_url : ${{ steps.upload.outputs.artifact-url }}
91- steps :
92- - uses : actions/checkout@v6
93- - name : Setup Flutter
94- uses : subosito/flutter-action@v2
95- with :
96- flutter-version : ' 3.32.0'
97- - name : Install dependencies
98- run : flutter pub get
99- - name : Build Windows x64
100- run : dart compile exe bin/main.dart -o api_tool_windows.exe
101- - name : Verify binary
102- run : |
103- git clone --depth 1 --branch develop https://github.com/Tencent/tdesign-flutter.git
104- dart run .github/scripts/cross_platform_verify.dart tdesign-flutter api_tool_windows.exe
105- - name : Upload Artifact
106- id : upload
107- uses : actions/upload-artifact@v4
108- with :
109- name : api_tool_windows
110- path : api_tool_windows.exe
32+ uses : ./.github/workflows/build-reusable.yml
33+ with :
34+ runner : windows-latest
35+ artifact-name : api_tool_windows
36+ binary-name : api_tool_windows.exe
11137
11238 comment-on-pr :
11339 needs : [build-macos-intel, build-macos-arm64, build-linux-x64, build-windows-x64]
@@ -120,16 +46,16 @@ jobs:
12046 issue-number : ${{ github.event.pull_request.number }}
12147 comment-author : ' github-actions[bot]'
12248 body-includes : 编译完成,产物如下
123-
49+
12450 - name : Create or Update PR Comment
12551 uses : peter-evans/create-or-update-comment@v4
12652 with :
12753 comment-id : ${{ steps.find-comment.outputs.comment-id }}
12854 issue-number : ${{ github.event.pull_request.number }}
12955 body : |
13056 ✅ 编译完成,产物如下:
131- - [api_tool_macos_intel](${{ needs.build-macos-intel.outputs.artifact_url }})
132- - [api_tool_macos_arm64](${{ needs.build-macos-arm64.outputs.artifact_url }})
133- - [api_tool_linux](${{ needs.build-linux-x64.outputs.artifact_url }})
134- - [api_tool_windows](${{ needs.build-windows-x64.outputs.artifact_url }})
57+ - [api_tool_macos_intel](${{ needs.build-macos-intel.outputs.artifact-url }})
58+ - [api_tool_macos_arm64](${{ needs.build-macos-arm64.outputs.artifact-url }})
59+ - [api_tool_linux](${{ needs.build-linux-x64.outputs.artifact-url }})
60+ - [api_tool_windows](${{ needs.build-windows-x64.outputs.artifact-url }})
13561 edit-mode : replace
0 commit comments