Skip to content

Fix releasing

Fix releasing #51

Workflow file for this run

name: CI
on:
push:
# Run on the main branch
branches:
- main
# Also on PRs, just be careful not to publish anything
pull_request:
jobs:
ci:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Build
run: |
for p in firmware pinetime-flash watchful-ui; do
pushd $p;
cargo build --release;
popd;
done
publish:
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
pip3 install adafruit-nrfutil
pip3 install -r tools/mcuboot/requirements.txt
cargo install cargo-binutils
- name: Build artifacts
run: |
cd firmware
cargo build --release
cargo objcopy --release -- -O binary watchful.bin
../tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header watchful.bin watchful-image.bin
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application watchful-image.bin watchful-dfu.zip
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: watchful.bin
path: firmware/watchful.bin
- name: Upload Mcuboot image
uses: actions/upload-artifact@v4
with:
name: watchful-image.bin
path: firmware/watchful-image.bin
- name: Upload DFU bundle
uses: actions/upload-artifact@v4
with:
name: watchful-dfu.zip
path: firmware/watchful-dfu.zip