🚀 更新 firmware_build.yml 自动化固件构建工作流文件

Signed-off-by: DAVE <ro7enkranz@qq.com>
This commit is contained in:
DAVE 2022-03-29 14:25:45 +08:00
parent f65569ab2a
commit 2c3340f8c2
2 changed files with 45 additions and 24 deletions

View File

@ -1,24 +1,45 @@
name: Build PCAN firmware name: Build PCAN firmware
on: on:
push: # push:
branches: [ master ] # branches: [ master ]
pull_request: # tags:
branches: [ master ] # - "v*.*.*"
release:
types: [published]
workflow_dispatch:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
uses: actions/checkout@v2
#- name: arm-none-eabi-gcc - name: Install gcc arm toolchain...
# uses: fiam/arm-none-eabi-gcc@v1
# with:
# release: '10-2020-q4'
- name: install toolchain...
run: sudo apt install -y gcc-arm-none-eabi run: sudo apt install -y gcc-arm-none-eabi
- name: build firmware... - name: Build firmware...
run: make run: make
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: pcan_firmware
path: |
build-*/*.hex
build-*/*.bin
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R pcan_firmware/
- name: Attach to release
uses: softprops/action-gh-release@v1
with:
files: |
pcan_firmware/*/*.hex
pcan_firmware/*/*.bin