mirror of
https://github.com/TheWhiteDog9487/lag2cn.git
synced 2026-08-11 23:01:29 +08:00
Update build.yml
This commit is contained in:
+16
-12
@@ -4,7 +4,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- language.cpp
|
- "language.cpp"
|
||||||
|
# 只在源代码被更新时运行
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -19,33 +20,36 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
g++ -o language --static -std=c++20 language.cpp
|
g++ -o language --static -std=c++20 language.cpp
|
||||||
aarch64-linux-gnu-g++ -o language_arm --static -std=c++20 language.cpp
|
aarch64-linux-gnu-g++ -o language_arm --static -std=c++20 language.cpp
|
||||||
|
# 静态链接,避免运行时才发现缺少so动态链接库
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 可执行二进制文件
|
name: language_arm
|
||||||
path: |
|
path: language_arm
|
||||||
language_arm
|
- uses: actions/upload-artifact@v4
|
||||||
language
|
with:
|
||||||
|
name: language
|
||||||
|
path: language
|
||||||
push:
|
push:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
# 更新仓库需要写入权限
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 可执行二进制文件
|
name: language
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: language_arm
|
||||||
|
|
||||||
- name: 提交
|
- name: 推送
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "gaojian520one@outlook.com"
|
git config --global user.email "gaojian520one@outlook.com"
|
||||||
git config --global user.name "TheWhiteDog9487"
|
git config --global user.name "TheWhiteDog9487"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "新的二进制文件"
|
git commit -m "新的二进制文件"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- name: 推送
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
Reference in New Issue
Block a user