mirror of
https://github.com/TheWhiteDog9487/lag2cn.git
synced 2026-08-11 23:01:29 +08:00
3ef4bd3948
后续每个更新我都会手动发release
40 lines
985 B
YAML
40 lines
985 B
YAML
name: 更新二进制可执行文件
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- "language.cpp"
|
|
# 只在源代码被更新时运行
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- target: x86_64-linux-musl
|
|
artifact: language
|
|
- target: aarch64-linux-musl
|
|
artifact: language_arm
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: 下载 musl 工具链
|
|
uses: lmq8267/dl-musl@main
|
|
with:
|
|
TARGET: ${{ matrix.target }}
|
|
STATIC: true
|
|
|
|
- name: 编译
|
|
run: |
|
|
if [ "${{ matrix.target }}" = "x86_64-linux-musl" ]; then
|
|
"$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s language.cpp
|
|
else
|
|
"$CXX" -o "${{ matrix.artifact }}" -std=c++23 -s language.cpp
|
|
fi
|
|
|
|
- uses: actions/upload-artifact@v5
|
|
with:
|
|
name: ${{ matrix.artifact }}
|
|
path: ${{ matrix.artifact }} |