-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Zelin Cai <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
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,55 @@ | ||
name: Build firmware | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
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 |
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,3 @@ | ||
|
||
# macOS internals | ||
.DS_Store |