Skip to content

Commit 5d25e1c

Browse files
authored
更新 build.yml
1 parent 36aecbf commit 5d25e1c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v6
28+
uses: actions/checkout@v4 # 建议升级到 v4
2929

3030
- uses: benjlevesque/short-sha@v3.0
3131
id: short-sha
@@ -41,6 +41,15 @@ jobs:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
FRONTEND_REPO: ${{ vars.FRONTEND_REPO }}
4343

44+
# === 新增步骤开始:手动安装 Zig,解决 snap 商店连接失败问题 ===
45+
- name: Setup Zig
46+
# 只有在 windows 或 musl 这种需要 Zig 的平台上才运行,节省其他平台的编译时间
47+
if: contains(matrix.target, 'windows') || contains(matrix.target, 'musl')
48+
uses: mlugg/setup-zig@v1
49+
with:
50+
version: 0.13.0 # AList/OpenList 推荐的稳定版本
51+
# === 新增步骤结束 ===
52+
4453
- name: Build
4554
uses: OpenListTeam/cgo-actions@v1.2.2
4655
with:
@@ -72,4 +81,4 @@ jobs:
7281
uses: actions/upload-artifact@v4
7382
with:
7483
name: openlist_${{ steps.short-sha.outputs.sha }}_${{ matrix.target }}
75-
path: build/*
84+
path: build/*

0 commit comments

Comments
 (0)