This repository was archived by the owner on Jun 26, 2026. It is now read-only.
BLE: fix Sideband connection flapping (supervision timeout) #28
Workflow file for this run
This file contains hidden or 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
| name: Release firmware | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.board }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| board: | |
| - Faketec | |
| - RAK4631 | |
| - XIAO_nRF52840 | |
| - Heltec_T114 | |
| - RAK3401 | |
| - T-Echo | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache PlatformIO toolchains and libraries | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.platformio/.cache | |
| ~/.platformio/packages | |
| ~/.platformio/platforms | |
| key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pio- | |
| - name: Install PlatformIO Core | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade platformio | |
| - name: Build ${{ matrix.board }} | |
| run: pio run -e ${{ matrix.board }} | |
| - name: Stage release assets | |
| id: stage | |
| run: | | |
| set -euo pipefail | |
| mkdir -p release-assets | |
| if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then | |
| VERSION="manual-$(date +%Y%m%d-%H%M%S)" | |
| else | |
| VERSION="${GITHUB_REF_NAME}" | |
| fi | |
| BOARD="${{ matrix.board }}" | |
| BASE="reticulum-rnode-${BOARD}-${VERSION}" | |
| cp ".pio/build/${BOARD}/firmware.zip" "release-assets/${BASE}.zip" | |
| cp ".pio/build/${BOARD}/firmware.hex" "release-assets/${BASE}.hex" | |
| python scripts/hex2uf2.py ".pio/build/${BOARD}/firmware.hex" "release-assets/${BASE}.uf2" | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| echo "base=${BASE}" >> "$GITHUB_OUTPUT" | |
| ls -la release-assets/ | |
| - name: Upload workflow artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware-${{ matrix.board }}-${{ steps.stage.outputs.version }} | |
| path: release-assets/* | |
| retention-days: 30 | |
| publish: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Checkout master | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Download all board artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: downloaded-artifacts | |
| pattern: firmware-* | |
| - name: Stage release assets (flat layout) | |
| run: | | |
| set -euo pipefail | |
| mkdir -p release-assets | |
| find downloaded-artifacts -type f \( -name '*.zip' -o -name '*.hex' -o -name '*.uf2' \) \ | |
| -exec cp -v {} release-assets/ \; | |
| echo "Release assets staged:" | |
| ls -la release-assets/ | |
| - name: Delete existing Release for a clean slate | |
| run: | | |
| gh release delete "${GITHUB_REF_NAME}" --yes --cleanup-tag=false 2>&1 || true | |
| - name: Create GitHub Release with all board assets | |
| run: | | |
| set -euo pipefail | |
| TAG="${GITHUB_REF_NAME}" | |
| PRERELEASE_FLAG="" | |
| if [[ "$TAG" == *-* ]]; then | |
| PRERELEASE_FLAG="--prerelease" | |
| fi | |
| cat > release-body.md <<'EOF' | |
| ## Flashing | |
| The easiest way to flash is the **web flasher** — visit | |
| https://thatSFguy.github.io/reticulum-rnode/ | |
| and pick this version from the dropdown. No toolchain | |
| install required, works in any Chromium-based browser. | |
| ## Manual flashing | |
| Per-board assets attached to this release: | |
| | File | How to use | | |
| |-------------------------|-------------------------------------------------------------------------| | |
| | `*.zip` | `adafruit-nrfutil dfu serial -pkg <zip> -p <port>`, or the web flasher | | |
| | `*.uf2` | Drag-and-drop onto NICENANO/XIAOBOOT USB drive (double-tap reset first) | | |
| | `*.hex` | nRFConnect Programmer, J-Link Commander, or any SWD tool | | |
| Put the board in **bootloader mode** (double-tap reset within | |
| ~500 ms) before flashing over serial or UF2. | |
| EOF | |
| gh release create "$TAG" \ | |
| --title "$TAG" \ | |
| --notes-file release-body.md \ | |
| $PRERELEASE_FLAG \ | |
| release-assets/* | |
| - name: Stage firmware under docs/firmware/<tag>/ for webflasher | |
| run: | | |
| set -euo pipefail | |
| TAG="${GITHUB_REF_NAME}" | |
| TARGET="docs/firmware/${TAG}" | |
| mkdir -p "${TARGET}" | |
| cp -v release-assets/* "${TARGET}/" | |
| ls -la "${TARGET}" | |
| - name: Regenerate manifest | |
| run: python scripts/gen_firmware_manifest.py | |
| - name: Commit webflasher assets and push | |
| run: | | |
| set -euo pipefail | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/firmware/ | |
| if git diff --cached --quiet; then | |
| echo "No firmware changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "ci: publish ${GITHUB_REF_NAME} firmware to docs/firmware/" | |
| git push origin HEAD:master |