Skip to content

Commit

Permalink
The initial commit.
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Cai <[email protected]>
  • Loading branch information
caizelin committed Aug 5, 2023
1 parent 78209bf commit af57ccf
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# macOS internals
.DS_Store

0 comments on commit af57ccf

Please sign in to comment.