Skip to content

Commit 2579703

Browse files
committed
action
1 parent 94f1b7c commit 2579703

2 files changed

Lines changed: 32 additions & 28 deletions

File tree

.github/workflows/dotnet-build.yml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,14 @@ jobs:
2121
- name: 设置.NET Core
2222
uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: 10.0.101
24+
dotnet-version: 10.0.103
2525

2626
- name: Read version number
2727
id: version
2828
run: |
2929
VERSION=$(cat ./build/version)
3030
echo "VERSION=$VERSION" >> $GITHUB_ENV
3131
32-
# - name: 更新源码
33-
# shell: bash
34-
# working-directory: ./
35-
# run: |
36-
# chmod a+x ./build/update.sh
37-
# ./build/update.sh
38-
3932
- name: 构建源码
4033
shell: bash
4134
working-directory: ./
@@ -187,21 +180,14 @@ jobs:
187180
- name: 设置.NET Core
188181
uses: actions/setup-dotnet@v4
189182
with:
190-
dotnet-version: 10.0.101
183+
dotnet-version: 10.0.103
191184

192185
- name: Read version number
193186
id: version
194187
run: |
195188
VERSION=$(cat ./build/version)
196189
echo "VERSION=$VERSION" >> $GITHUB_ENV
197190
198-
# - name: 更新源码
199-
# shell: bash
200-
# working-directory: ./
201-
# run: |
202-
# chmod a+x ./build/update.sh
203-
# ./build/update.sh
204-
205191
- name: 构建
206192
shell: bash
207193
working-directory: ./
@@ -233,6 +219,29 @@ jobs:
233219
with:
234220
name: "colormc-macos-min-aarch64"
235221
path: build_out/colormc-macos-${{ env.VERSION }}-min-aarch64.zip
222+
- name: 上传 colormc-macos-x86_64-dmg
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: "colormc-macos-x86_64-dmg"
226+
path: build_out/colormc-macos-${{ env.VERSION }}-x86_64.dmg
227+
228+
- name: 上传 colormc-macos-min-x86_64-dmg
229+
uses: actions/upload-artifact@v4
230+
with:
231+
name: "colormc-macos-min-x86_64-dmg"
232+
path: build_out/colormc-macos-${{ env.VERSION }}-min-x86_64.dmg
233+
234+
- name: 上传 colormc-macos-aarch64-dmg
235+
uses: actions/upload-artifact@v4
236+
with:
237+
name: "colormc-macos-aarch64-dmg"
238+
path: build_out/colormc-macos-${{ env.VERSION }}-aarch64.dmg
239+
240+
- name: 上传 colormc-macos-min-aarch64-dmg
241+
uses: actions/upload-artifact@v4
242+
with:
243+
name: "colormc-macos-min-aarch64-dmg"
244+
path: build_out/colormc-macos-${{ env.VERSION }}-min-aarch64.dmg
236245

237246
build-windows:
238247
runs-on: windows-latest
@@ -251,12 +260,7 @@ jobs:
251260
- name: 设置.NET Core
252261
uses: actions/setup-dotnet@v4
253262
with:
254-
dotnet-version: 10.0.101
255-
256-
# - name: 更新源码
257-
# shell: cmd
258-
# working-directory: ./
259-
# run: ./build/update.cmd
263+
dotnet-version: 10.0.103
260264

261265
- name: 构建 源码
262266
shell: cmd

build/build-dmg.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ build() {
3333
local app_name="ColorMC"
3434
local app_path="./src/build_out/$1-dotnet/ColorMC.app"
3535
local background=${2:-""} # 可选背景图
36-
local output_name="colormc-macos-$version-$1"
36+
local output_name="colormc-macos-$version-$2"
3737

3838
echo "build DMG: $output_name"
3939

@@ -68,7 +68,7 @@ build_min() {
6868
local app_name="ColorMC"
6969
local app_path="./src/build_out/$1-min/ColorMC.app"
7070
local background=${2:-""} # 可选背景图
71-
local output_name="colormc-macos-$version-min-$1"
71+
local output_name="colormc-macos-$version-min-$2"
7272

7373
echo "build DMG: $output_name"
7474

@@ -106,7 +106,7 @@ if [ $? -ne 0 ]; then
106106
exit 1
107107
fi
108108

109-
build osx-arm64
110-
build osx-x64
111-
build_min osx-arm64
112-
build_min osx-x64
109+
build osx-arm64 aarch64
110+
build osx-x64 x86_64
111+
build_min osx-arm64 aarch64
112+
build_min osx-x64 x86_64

0 commit comments

Comments
 (0)