mirror of
https://github.com/TheWhiteDog9487/lag2cn.git
synced 2026-08-11 23:01:29 +08:00
更新Workflow配置
This commit is contained in:
+41
-25
@@ -1,34 +1,50 @@
|
|||||||
name: 更新二进制可执行文件
|
name: 更新二进制可执行文件
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- language.cpp
|
- language.cpp
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
build:
|
||||||
- uses: actions/checkout@v4
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: 安装GCC对ARM交叉编译工具链
|
||||||
|
run: apt install gcc-arm-none-eabi
|
||||||
|
|
||||||
|
- name: 编译源代码
|
||||||
|
run: |
|
||||||
|
arm-none-eabi-g++ -o language_arm --static -std=c++26 languagecpp
|
||||||
|
g++ -o language --static -std=c++26 language.cpp
|
||||||
|
|
||||||
- name: 安装GCC对ARM交叉编译工具链
|
- uses: actions/upload-artifact@v4
|
||||||
run: apt install gcc-arm-none-eabi
|
with:
|
||||||
|
name: 可执行二进制文件
|
||||||
- name: 编译源代码
|
path: |
|
||||||
run: |
|
language_arm
|
||||||
arm-none-eabi-g++ -o language_arm --static language.cpp
|
language
|
||||||
g++ -o language --static language.cpp
|
|
||||||
|
|
||||||
- name: 提交
|
push:
|
||||||
run: |
|
needs: build
|
||||||
git config --global user.email "gaojian520one@outlook.com"
|
runs-on: ubuntu-latest
|
||||||
git config --global user.name "TheWhiteDog9487"
|
permissions:
|
||||||
git add .
|
contents: write
|
||||||
git commit -m "新的二进制文件"
|
|
||||||
git push
|
|
||||||
|
|
||||||
- name: 推送
|
steps:
|
||||||
uses: ad-m/github-push-action@master
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: 可执行二进制文件
|
||||||
|
|
||||||
|
- name: 提交
|
||||||
|
run: |
|
||||||
|
git config --global user.email "gaojian520one@outlook.com"
|
||||||
|
git config --global user.name "TheWhiteDog9487"
|
||||||
|
git add .
|
||||||
|
git commit -m "新的二进制文件"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: 推送
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
Reference in New Issue
Block a user