From 566c5883772611a6b374e5b6ada60a978f2151a8 Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Tue, 14 Oct 2025 10:44:33 -0400 Subject: [PATCH] Fix protobuf github workflow (#884) * fix: protobuf workflow * update workflow name * fixes --- .github/workflows/release-protobufs.yml | 20 +++++++++++--------- README.md | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-protobufs.yml b/.github/workflows/release-protobufs.yml index 0857e735..b1ee9224 100644 --- a/.github/workflows/release-protobufs.yml +++ b/.github/workflows/release-protobufs.yml @@ -15,6 +15,9 @@ on: permissions: write-all +env: + PROTOBUF_DIR: ./packages/protobufs # 👈 single source of truth + jobs: codegen: runs-on: ubuntu-24.04 @@ -27,8 +30,8 @@ jobs: - name: Show files exist run: | set -euxo pipefail - ls -la packages/ts || true - cat packages/ts/deno.json + ls -la $PROTOBUF_DIR/packages/ts || true + cat $PROTOBUF_DIR/packages/ts/deno.json - name: Determine VERSION run: | @@ -44,7 +47,7 @@ jobs: echo "Resolved VERSION=$STRIPPED" - name: Set Package Versions to current tag - working-directory: packages/ts + working-directory: ${{ env.PROTOBUF_DIR }}/packages/ts run: | set -euxo pipefail for f in deno.json; do @@ -68,12 +71,11 @@ jobs: - name: Generate code run: pnpm --filter @meshtastic/protobufs build - - name: Move generated .ts files and clean up run: | set -euxo pipefail - SRC_DIR="packages/protobufs/packages/ts/dist/meshtastic" - DEST_DIR="packages/protobufs/packages/ts/dist" + SRC_DIR="$PROTOBUF_DIR/packages/ts/dist/meshtastic" + DEST_DIR="$PROTOBUF_DIR/packages/ts/dist" if [ -d "$SRC_DIR" ]; then shopt -s nullglob @@ -94,14 +96,14 @@ jobs: - name: Copy license & README run: | - cp LICENSE packages/ts - cp README.md packages/ts + cp LICENSE $PROTOBUF_DIR/packages/ts + cp README.md $PROTOBUF_DIR/packages/ts - name: Upload TypeScript code uses: actions/upload-artifact@v4 with: name: ts_code - path: packages/ts + path: ${{ env.PROTOBUF_DIR }}/packages/ts - name: Push to schema registry env: diff --git a/README.md b/README.md index ab01a55b..654c216f 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,12 @@ All projects are located within the `packages/` directory: - **[Hosted version](https://client.meshtastic.org)** - **`packages/core`:** Core functionality for Meshtastic JS. - **`packages/transport-node`:** TCP Transport for the NodeJS runtime. +- **`packages/transport-node-serial`:** NodeJS Serial Transport for the NodeJS runtime. - **`packages/transport-deno`:** TCP Transport for the Deno runtime. - **`packages/transport-http`:** HTTP Transport. - **`packages/transport-web-bluetooth`:** Web Bluetooth Transport. - **`packages/transport-web-serial`:** Web Serial Transport. +- **`packages/protobufs`:** Git submodule containing Meshtastic’s shared protobuf definitions, used to generate and publish the JSR protobuf package. All `Meshtastic JS` packages (core and transports) are published both to [JSR](https://jsr.io/@meshtastic). [NPM](https://www.npmjs.com/org/meshtastic)