Skip to content

release

release #19

Workflow file for this run

name: release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
name: Publish firmware binaries
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- device: "F401"
device_id: "STMicroelectronics.stm32.GenF4"
- device: "F411"
device_id: "STMicroelectronics.stm32.GenF4"
- device: "F407"
device_id: "STMicroelectronics.stm32.Disco"
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install arduino-cli
run: |
# Note: the current step cannot access the updated path
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Configure arduino-cli
run: |
arduino-cli version
arduino-cli config init
arduino-cli config add board_manager.additional_urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
arduino-cli core update-index
arduino-cli core install STMicroelectronics:[email protected]
- name: Patch cdc_queue.h
shell: bash
run: |
pip3 install pyyaml pathlib # required on MacOS/Windows runners
REPO_ROOT=$PWD
STM32_DIR=$(python/get_arduino_stm32_directory.py)
echo "STM32_DIR = ${STM32_DIR}"
cd ${STM32_DIR}/cores/arduino/stm32/usb/cdc
patch < ${REPO_ROOT}/patch/cdc_queue.patch
- name: Compile ${{ matrix.device }} device code
run: |
cd device
make device DEV=${{ matrix.device }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: device/PowerSensor/build/${{ matrix.device_id }}/PowerSensor.ino.bin
asset_name: PowerSensor_firmware_${{ matrix.device }}.bin
tag: ${{ github.ref }}