mirror of
https://github.com/sascha-hemi/HGD4_reversed.git
synced 2026-03-21 00:03:48 +01:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Release nRF Firmware
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build-and-upload:
|
|
name: Build & Upload Firmware
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install PlatformIO
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install platformio
|
|
pip install adafruit-nrfutil
|
|
|
|
- name: Build Firmware
|
|
run: |
|
|
cd NRF_firmware
|
|
pio run
|
|
|
|
- name: Copy Production Firmware
|
|
run: |
|
|
mkdir firmware_output
|
|
cp NRF_firmware/.pio/build/hgd4/production.hex firmware_output/production.hex
|
|
cp NRF_firmware/.pio/build/hgd4/dfu.zip firmware_output/dfu.zip
|
|
|
|
- name: Rename Files with Release Tag
|
|
run: |
|
|
TAG_NAME=${{ github.event.release.tag_name }}
|
|
mv firmware_output/production.hex firmware_output/production-${TAG_NAME}.hex
|
|
mv firmware_output/dfu.zip firmware_output/dfu-${TAG_NAME}.zip
|
|
|
|
- name: Add files to release
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: firmware_output/*
|
|
tag: ${{ github.ref }}
|
|
file_glob: true
|
|
overwrite: true
|