File tree Expand file tree Collapse file tree 5 files changed +12
-67
lines changed
Expand file tree Collapse file tree 5 files changed +12
-67
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2424
2525 - name : Create header files
2626 run : |
27- cp "${GITHUB_WORKSPACE}/.github/workflows/dummy_priv_key.pem" "${GITHUB_WORKSPACE}/priv_key.pem"
2827 cp "${GITHUB_WORKSPACE}/noisemeter-device/config.h.example" "${GITHUB_WORKSPACE}/noisemeter-device/config.h"
2928 python "${GITHUB_WORKSPACE}/noisemeter-device/certs.py" -s api.tracket.info > "${GITHUB_WORKSPACE}/noisemeter-device/certs.h"
3029
3332
3433 - name : Build PlatformIO Project (esp32-breadboard)
3534 run : pio run -e esp32-breadboard
35+
Original file line number Diff line number Diff line change 3232 cp "${GITHUB_WORKSPACE}/noisemeter-device/config.h.example" "${GITHUB_WORKSPACE}/noisemeter-device/config.h"
3333 python "${GITHUB_WORKSPACE}/noisemeter-device/certs.py" -s api.tracket.info > "${GITHUB_WORKSPACE}/noisemeter-device/certs.h"
3434
35- - name : Build PlatformIO Project
36- run : pio run -e esp32-pcb
35+ - name : Build signed firmware
36+ run : pio run -t ota - e esp32-pcb
3737
3838 - name : Upload signed firmware
3939 uses : djn24/add-asset-to-release@v1
Original file line number Diff line number Diff line change 11Import ("env" )
22
3- env .AddPostAction (
4- "$BUILD_DIR/${PROGNAME}.bin" ,
5- env .VerboseAction (
3+ env .AddCustomTarget (
4+ name = "ota" ,
5+ dependencies = "$BUILD_DIR/${PROGNAME}.bin" ,
6+ actions = [
67 "openssl dgst -sha256 -sign priv_key.pem -keyform PEM -out $BUILD_DIR/${PROGNAME}.sig -binary $BUILD_DIR/${PROGNAME}.bin" ,
7- "Creating OTA signature..." )
8- )
9-
10- env .AddPostAction (
11- "$BUILD_DIR/${PROGNAME}.bin" ,
12- env .VerboseAction (
13- "cat $BUILD_DIR/${PROGNAME}.sig $BUILD_DIR/${PROGNAME}.bin > ${PROGNAME}_signed.bin" ,
14- "Creating ${PROGNAME}_signed.bin" )
8+ "cat $BUILD_DIR/${PROGNAME}.sig $BUILD_DIR/${PROGNAME}.bin > ${PROGNAME}_signed.bin"
9+ ],
10+ title = "OTA Signing" ,
11+ description = "Create a signed OTA update"
1512)
1613
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ include_dir = noisemeter-device
1414default_envs = esp32-pcb
1515
1616[env]
17- extra_scripts = post: build_hooks.py
17+ extra_scripts = build_hooks.py
1818framework = arduino
19192020board_build.partitions = nmpartitions.csv
You can’t perform that action at this time.
0 commit comments