Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dzervas authored Aug 9, 2023
1 parent 1f6dd24 commit c69ed17
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,35 @@ jobs:
tag_name: ${{ env.ZMK_COMMIT }}
release_name: Release ${{ env.ZMK_COMMIT }}
body: |
To flash ${{ matrix.target_shield }}:
To flash ZMK:
```bash
wget https://github.com/dzervas/zmk-config/releases/download/${{ env.ZMK_COMMIT }}/${{ matrix.target_shield }}.bin -O /tmp/${{ matrix.target_shield }}.bin && \
go install github.com/apache/mynewt-mcumgr-cli/mcumgr@latest && \
mcumgr --conntype=serial --connstring='dev=/dev/ttyACM0,baud=115200' image upload -e /tmp/${{ matrix.target_shield }}.bin
go install github.com/apache/mynewt-mcumgr-cli/mcumgr@latest
export SHIELD=<shield name>
wget https://github.com/dzervas/zmk-config/releases/download/${{ env.ZMK_COMMIT }}/$SHIELD.bin -O /tmp/$SHIELD.bin
mcumgr --conntype=serial --connstring='dev=/dev/ttyACM0,baud=115200' image upload -e /tmp/$SHIELD.bin
```
To flash mcuboot (connect Particle Debugger and install openocd):
```bash
wget https://github.com/dzervas/zmk-config/releases/download/${{ env.ZMK_COMMIT }}/mcuboot.hex -O /tmp/mcuboot.hex && \
wget https://github.com/dzervas/zmk-config/raw/main/nrf52-particle.cfg -O /tmp/nrf52-particle.cfg && \
openocd -f interface/cmsis-dap.cfg -f /tmp/nrf52-particle.cfg -c "init" -c "reset init" -c "halt" -c "program /tmp/mcuboot-${{ matrix.target_shield }}.hex 0x0 verify reset" -c "exit"
wget https://github.com/dzervas/zmk-config/raw/main/nrf52-particle.cfg -O /tmp/nrf52-particle.cfg
export SHIELD=<shield name>
wget https://github.com/dzervas/zmk-config/releases/download/${{ env.ZMK_COMMIT }}/mcuboot-$SHIELD.hex -O /tmp/mcuboot-$SHIELD.hex
openocd -f interface/cmsis-dap.cfg -f /tmp/nrf52-particle.cfg -c "init" -c "reset init" -c "halt" -c "program /tmp/mcuboot-$SHIELD.hex 0x0 verify reset" -c "exit"
```
- name: Upload Release Asset (mcuboot)
uses: actions/upload-release-asset@v1
if: success() || failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./mcuboot.hex
asset_name: mcuboot.hex
asset_name: mcuboot-${{ matrix.target_shield }}.hex
asset_content_type: text/plain

- name: Upload Release Asset (${{ matrix.target_shield }})
uses: actions/upload-release-asset@v1
if: success() || failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit c69ed17

Please sign in to comment.