From fe6236cbb1872f3313202036299f262623eec2f4 Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 <60037547+TheWhiteDog9487@users.noreply.github.com> Date: Sat, 12 Oct 2024 04:16:59 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A8=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..17c53e6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: 更新二进制可执行文件 + +on: + push: + paths: + - language.cpp + +jobs: + build: + permissions: + contents: write + 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 language.cpp + g++ -o language --static language.cpp + + - 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 \ No newline at end of file