From 21daf79ddf54945727dde14ed0613ef804311ccc Mon Sep 17 00:00:00 2001 From: Jared Dohrman Date: Tue, 5 May 2026 20:50:57 +1000 Subject: [PATCH] feat: add bridge firmware release workflows --- .../setup-build-environment/action.yml | 13 ++++++ ...build-repeater-bridge-espnow-firmwares.yml | 42 +++++++++++++++++++ ...h-build-repeater-mqtt-bridge-firmwares.yml | 12 ++++++ AGENTS.md | 6 ++- RELEASE.md | 19 +++++++-- eastmesh-build.sh | 12 ++++++ src/helpers/web/WebPanelServer.h | 2 +- 7 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/eastmesh-build-repeater-bridge-espnow-firmwares.yml diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 88b665e5..bf55051a 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -42,11 +42,16 @@ runs: # Active release tag formats: # companion-wifi-v1.2.3 + # repeater-bridge-espnow-v1.2.3 + # repeater-mqtt-bridge-eastmesh-v1.0.1 # repeater-mqtt-eastmesh-v1.0.1 # with OFFICIAL_MESHCORE_VERSION=v1.2.3 configured as a GitHub variable. # # This exports: # companion-wifi-v1.2.3 -> FIRMWARE_VERSION=v1.2.3, RELEASE_VERSION=v1.2.3 + # repeater-bridge-espnow-v1.2.3 -> FIRMWARE_VERSION=v1.2.3, RELEASE_VERSION=v1.2.3 + # repeater-mqtt-bridge-eastmesh-v1.0.1 -> FIRMWARE_VERSION=v1.2.3, EASTMESH_VERSION=v1.0.1, + # RELEASE_VERSION=v1.2.3-eastmesh-v1.0.1 # repeater-mqtt-eastmesh-v1.0.1 -> FIRMWARE_VERSION=v1.2.3, EASTMESH_VERSION=v1.0.1, # RELEASE_VERSION=v1.2.3-eastmesh-v1.0.1 - name: Extract Version Info @@ -74,8 +79,16 @@ runs: exit 1 fi EASTMESH_VERSION="${BASH_REMATCH[1]}" + elif [[ "$GIT_TAG_NAME" =~ ^repeater-mqtt-bridge-eastmesh-(v[[:alnum:]._-]+)$ ]]; then + if [[ -z "$STATIC_OFFICIAL_VERSION" ]]; then + echo "OFFICIAL_MESHCORE_VERSION must be set for EastMesh release tags" >&2 + exit 1 + fi + EASTMESH_VERSION="${BASH_REMATCH[1]}" elif [[ "$GIT_TAG_NAME" =~ ^companion-wifi-(v[[:alnum:]._-]+)$ ]]; then FIRMWARE_VERSION="${BASH_REMATCH[1]}" + elif [[ "$GIT_TAG_NAME" =~ ^repeater-bridge-espnow-(v[[:alnum:]._-]+)$ ]]; then + FIRMWARE_VERSION="${BASH_REMATCH[1]}" else echo "Unsupported release tag format: $GIT_TAG_NAME" >&2 exit 1 diff --git a/.github/workflows/eastmesh-build-repeater-bridge-espnow-firmwares.yml b/.github/workflows/eastmesh-build-repeater-bridge-espnow-firmwares.yml new file mode 100644 index 00000000..cc3e8cc2 --- /dev/null +++ b/.github/workflows/eastmesh-build-repeater-bridge-espnow-firmwares.yml @@ -0,0 +1,42 @@ +name: EastMesh Build Repeater ESP-NOW Bridge Firmwares + +permissions: + contents: write + +on: + workflow_dispatch: + push: + tags: + - 'repeater-bridge-espnow-v*' + +jobs: + + build: + runs-on: ubuntu-latest + env: + OFFICIAL_MESHCORE_VERSION: ${{ vars.OFFICIAL_MESHCORE_VERSION }} + steps: + + - name: Clone Repo + uses: actions/checkout@v6 + + - name: Setup Build Environment + uses: ./.github/actions/setup-build-environment + + - name: Build Firmwares + run: /usr/bin/env bash eastmesh-build.sh build-repeater-bridge-espnow-firmwares + + - name: Upload Workflow Artifacts + uses: actions/upload-artifact@v7 + with: + name: repeater-bridge-espnow-firmwares + path: out + + - name: Create Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + name: Repeater ESP-NOW Bridge Firmware ${{ env.RELEASE_VERSION }} + body: "" + draft: true + files: out/* diff --git a/.github/workflows/eastmesh-build-repeater-mqtt-bridge-firmwares.yml b/.github/workflows/eastmesh-build-repeater-mqtt-bridge-firmwares.yml index 9044f63b..29c1b472 100644 --- a/.github/workflows/eastmesh-build-repeater-mqtt-bridge-firmwares.yml +++ b/.github/workflows/eastmesh-build-repeater-mqtt-bridge-firmwares.yml @@ -5,6 +5,9 @@ permissions: on: workflow_dispatch: + push: + tags: + - 'repeater-mqtt-bridge-eastmesh-*' jobs: @@ -29,3 +32,12 @@ jobs: with: name: repeater-mqtt-bridge-firmwares path: out + + - name: Create Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + name: Repeater MQTT Bridge Firmware ${{ env.RELEASE_VERSION }} + body: "" + draft: true + files: out/* diff --git a/AGENTS.md b/AGENTS.md index dcd4c16b..9791c2a0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -170,14 +170,18 @@ Current tag formats: ```bash git tag companion-wifi-v1.2.3 +git tag repeater-bridge-espnow-v1.2.3 +git tag repeater-mqtt-bridge-eastmesh-v1.0.1 git tag repeater-mqtt-eastmesh-v1.0.1 ``` Rules: - `companion-wifi` tags use the upstream MeshCore version directly +- `repeater-bridge-espnow` tags use the upstream MeshCore version directly +- `repeater-mqtt-bridge` tags use the EastMesh release version in the tag - `repeater-mqtt` tags use the EastMesh release version in the tag -- GitHub Actions variable `OFFICIAL_MESHCORE_VERSION` supplies the upstream base version for repeater MQTT release builds +- GitHub Actions variable `OFFICIAL_MESHCORE_VERSION` supplies the upstream base version for repeater MQTT and repeater MQTT bridge release builds - if the upstream MeshCore release version changes, update `OFFICIAL_MESHCORE_VERSION` in GitHub before cutting release tags Typical release flow: diff --git a/RELEASE.md b/RELEASE.md index 15afe2d7..4f730224 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,14 +17,20 @@ This value becomes the base `FIRMWARE_VERSION` used by the release workflows. Push one or more of the following tag formats to trigger the matching firmware release workflow: - `companion-wifi-v1.2.3` +- `repeater-bridge-espnow-v1.2.3` +- `repeater-mqtt-bridge-eastmesh-v1.0.1` - `repeater-mqtt-eastmesh-v1.0.1` Use the upstream MeshCore version in `companion-wifi-v1.2.3`. +Use the upstream MeshCore version in `repeater-bridge-espnow-v1.2.3`. +Use the EastMesh release version in `repeater-mqtt-bridge-eastmesh-v1.0.1`. Use the EastMesh release version in `repeater-mqtt-eastmesh-v1.0.1`. Each tag triggers a separate workflow: - `companion-wifi-v*` builds companion WiFi firmware +- `repeater-bridge-espnow-v*` builds repeater ESP-NOW bridge firmware +- `repeater-mqtt-bridge-eastmesh-*` builds repeater MQTT bridge firmware - `repeater-mqtt-eastmesh-*` builds repeater MQTT firmware You can push one, or more tags on the same commit, and they will all build separately. @@ -34,12 +40,15 @@ You can push one, or more tags on the same commit, and they will all build separ During the GitHub Actions build: - `companion-wifi` uses the version in the tag as `FIRMWARE_VERSION` -- `repeater-mqtt` uses `OFFICIAL_MESHCORE_VERSION` as `FIRMWARE_VERSION` -- `repeater-mqtt` uses the EastMesh version from the tag as `EASTMESH_VERSION` +- `repeater-bridge-espnow` uses the version in the tag as `FIRMWARE_VERSION` +- `repeater-mqtt-bridge` uses `OFFICIAL_MESHCORE_VERSION` as `FIRMWARE_VERSION` and the EastMesh version from the tag as `EASTMESH_VERSION` +- `repeater-mqtt` uses `OFFICIAL_MESHCORE_VERSION` as `FIRMWARE_VERSION` and the EastMesh version from the tag as `EASTMESH_VERSION` The resulting version string depends on the workflow: - `companion-wifi`: `v1.2.3-` +- `repeater-bridge-espnow`: `v1.2.3-` +- `repeater-mqtt-bridge`: `v1.2.3-eastmesh-v1.0.1-` - `repeater-mqtt`: `v1.2.3-eastmesh-v1.0.1-` Example: @@ -65,11 +74,15 @@ Example: ```bash git tag companion-wifi-v1.2.3 +git tag repeater-bridge-espnow-v1.2.3 +git tag repeater-mqtt-bridge-eastmesh-v1.0.1 git tag repeater-mqtt-eastmesh-v1.0.1 -git push origin companion-wifi-v1.2.3 repeater-mqtt-eastmesh-v1.0.1 +git push origin companion-wifi-v1.2.3 repeater-bridge-espnow-v1.2.3 repeater-mqtt-bridge-eastmesh-v1.0.1 repeater-mqtt-eastmesh-v1.0.1 ``` ## Supported Tags - `companion-wifi-v1.2.3` +- `repeater-bridge-espnow-v1.2.3` +- `repeater-mqtt-bridge-eastmesh-v1.0.1` - `repeater-mqtt-eastmesh-v1.0.1` diff --git a/eastmesh-build.sh b/eastmesh-build.sh index 764487d4..ed88070e 100755 --- a/eastmesh-build.sh +++ b/eastmesh-build.sh @@ -34,6 +34,7 @@ Commands: build-companion-firmwares: Build all companion firmwares for all build targets. build-companion-wifi-firmwares: Build all companion WiFi firmwares for all build targets. build-repeater-firmwares: Build all repeater firmwares for all build targets. + build-repeater-bridge-espnow-firmwares: Build all repeater ESP-NOW bridge firmwares for all build targets. build-repeater-mqtt-firmwares: Build all repeater MQTT firmwares for all build targets. build-repeater-mqtt-bridge-firmwares: Build all repeater MQTT bridge firmwares for all build targets. build-room-server-firmwares: Build all chat room server firmwares for all build targets. @@ -54,6 +55,9 @@ $ sh eastmesh-build.sh build-companion-wifi-firmwares Build all repeater firmwares $ sh eastmesh-build.sh build-repeater-firmwares +Build all repeater ESP-NOW bridge firmwares +$ sh eastmesh-build.sh build-repeater-bridge-espnow-firmwares + Build all repeater MQTT firmwares $ sh eastmesh-build.sh build-repeater-mqtt-firmwares @@ -279,6 +283,12 @@ build_repeater_firmwares() { } +build_repeater_bridge_espnow_firmwares() { + + build_all_firmwares_by_suffix "_repeater_bridge_espnow" + +} + build_companion_firmwares() { # # build specific companion firmwares @@ -364,6 +374,8 @@ elif [[ $1 == "build-companion-wifi-firmwares" ]]; then build_companion_wifi_firmwares elif [[ $1 == "build-repeater-firmwares" ]]; then build_repeater_firmwares +elif [[ $1 == "build-repeater-bridge-espnow-firmwares" ]]; then + build_repeater_bridge_espnow_firmwares elif [[ $1 == "build-repeater-mqtt-firmwares" ]]; then build_repeater_mqtt_firmwares elif [[ $1 == "build-repeater-mqtt-bridge-firmwares" ]]; then diff --git a/src/helpers/web/WebPanelServer.h b/src/helpers/web/WebPanelServer.h index e1d0ce58..73918e50 100644 --- a/src/helpers/web/WebPanelServer.h +++ b/src/helpers/web/WebPanelServer.h @@ -4,7 +4,7 @@ #if defined(ESP_PLATFORM) #include - #if !defined(WITH_WEB_PANEL) + #if defined(WITH_MQTT_UPLINK) && !defined(WITH_WEB_PANEL) #define WITH_WEB_PANEL 1 #endif #if WITH_WEB_PANEL