-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created workflow for automatic firmware compilation for new releases
- Loading branch information
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Automated firmware build for release | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, firmware-builder] | ||
env: | ||
BLE_ROOT: ../../../../ | ||
|
||
steps: | ||
- name: extract code version | ||
id: code-version | ||
run: echo "VERSION=$(echo ${{ github.ref }} | cut -c 12-)" >> $GITHUB_OUTPUT | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: check code version | ||
run: grep ${{ steps.code-version.outputs.VERSION }} Makefile | ||
- name: parse feature template | ||
uses: cuchi/jinja2-action@v1.2.2 | ||
with: | ||
template: src/config/feature_config.template.h.jinja | ||
output_file: src/config/feature_config.template.h | ||
- name: set PATH | ||
run: echo "../../../../" >> $GITHUB_PATH | ||
- name: build firmware for nRF51 (no crystal) | ||
run: make clean sign | ||
env: | ||
FAMILY: NRF51 | ||
OUT_ZIP: nrf51_no_crystal.zip | ||
BOARD: WT51822_S4AT | ||
- name: build firmware for nRF51 (crystal) | ||
run: make clean sign | ||
env: | ||
FAMILY: NRF51 | ||
OUT_ZIP: nrf51_crystal.zip | ||
BOARD: BEACON_SMALL | ||
- name: build firmware for nRF52 (no crystal) | ||
run: make clean sign | ||
env: | ||
FAMILY: NRF52 | ||
OUT_ZIP: nrf52_no_crystal.zip | ||
BOARD: HOLYIOT_17095 | ||
- name: Upload nRF51 (no crystal) firmware to latest release | ||
uses: svenstaro/upload-release-action@2.7.0 | ||
with: | ||
file: nrf51_no_crystal.zip | ||
asset_name: nrf51_no_crystal_${{ steps.code-version.outputs.VERSION }}.zip | ||
overwrite: true | ||
- name: Upload nRF51 (crystal) firmware to latest release | ||
uses: svenstaro/upload-release-action@2.7.0 | ||
with: | ||
file: nrf51_crystal.zip | ||
asset_name: nrf51_crystal_${{ steps.code-version.outputs.VERSION }}.zip | ||
overwrite: true | ||
- name: Upload nRF52 (no crystal) firmware to latest release | ||
uses: svenstaro/upload-release-action@2.7.0 | ||
with: | ||
file: nrf52_no_crystal.zip | ||
asset_name: nrf52_no_crystal_${{ steps.code-version.outputs.VERSION }}.zip | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters