-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.52 KB
/
firmware.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build firmware
on:
push:
branches:
- main
release:
types:
- created
jobs:
build-firmware:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenSK repository
uses: actions/checkout@v3
with:
repository: google/OpenSK
ref: develop
submodules: true
path: OpenSK
- name: Get the version
id: get_version
working-directory: OpenSK
run: echo "VERSION=$(git describe --always --tags)" >> $GITHUB_OUTPUT
- name: Install Rust toolchain
run: rustup show
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --pre -U git+https://github.com/makerdiary/uf2utils.git@main
- name: Set up OpenSK
working-directory: OpenSK
run: ./setup.sh
- name: Building board nrf52840_mdk_dfu
working-directory: OpenSK
run: |
./deploy.py --board=nrf52840_mdk_dfu --opensk --programmer=none
uf2conv -c -f 0xada52840 -o target/opensk-dongle_nrf52840-${{ steps.get_version.outputs.VERSION }}.uf2 target/nrf52840_mdk_dfu_merged.hex
- name: Upload firmware
uses: actions/upload-artifact@v3
with:
name: opensk-firmware-${{ steps.get_version.outputs.VERSION }}
path: |
OpenSK/target/opensk-dongle_nrf52840-${{ steps.get_version.outputs.VERSION }}.uf2