修复Action不使用静态链接的问题

This commit is contained in:
TheWhiteDog9487
2026-05-24 14:38:03 +08:00
parent 35957099c8
commit acab359e53
+5 -5
View File
@@ -1,4 +1,4 @@
name: 更新二进制可执行文件 name: 构建二进制可执行文件
on: on:
workflow_dispatch: workflow_dispatch:
@@ -23,15 +23,15 @@ jobs:
- name: 下载 musl 工具链 - name: 下载 musl 工具链
uses: lmq8267/dl-musl@main uses: lmq8267/dl-musl@main
with: with:
TARGET: ${{ matrix.target }} target: ${{ matrix.target }}
STATIC: true static: true
- name: 编译 - name: 编译
run: | run: |
if [ "${{ matrix.target }}" = "x86_64-linux-musl" ]; then if [ "${{ matrix.target }}" = "x86_64-linux-musl" ]; then
"$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s language.cpp "$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s --static language.cpp
else else
"$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s language.cpp "$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s --static language.cpp
fi fi
- uses: actions/upload-artifact@v5 - uses: actions/upload-artifact@v5