File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release nRF Firmware
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build-and-upload :
9+ name : Build & Upload Firmware
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout Code
14+ uses : actions/checkout@v4
15+
16+ - name : Install PlatformIO
17+ run : |
18+ python -m pip install --upgrade pip
19+ pip install platformio
20+ pip install adafruit-nrfutil
21+
22+ - name : Build Firmware
23+ run : |
24+ cd NRF_firmware
25+ pio run
26+
27+ - name : Copy Production Firmware
28+ run : |
29+ mkdir firmware_output
30+ cp .pio/build/oeplnrf/production.hex firmware_output/production.hex
31+
32+ - name : Rename Files with Release Tag
33+ run : |
34+ TAG_NAME=${{ github.event.release.tag_name }}
35+ adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application firmware_output/production.hex firmware_output/dfu.zip
36+ mv firmware_output/production.hex firmware_output/production-${TAG_NAME}.hex
37+ mv firmware_output/dfu.zip firmware_output/dfu-${TAG_NAME}.zip
38+
39+ - name : Add files to release
40+ uses : svenstaro/upload-release-action@v2
41+ with :
42+ repo_token : ${{ secrets.GITHUB_TOKEN }}
43+ file : firmware_output/*
44+ tag : ${{ github.ref }}
45+ file_glob : true
46+ overwrite : true
You can’t perform that action at this time.
0 commit comments