mirror of
https://github.com/meshtastic/web.git
synced 2025-12-24 00:00:01 -05:00
Fix protobuf github workflow (#884)
* fix: protobuf workflow * update workflow name * fixes
This commit is contained in:
20
.github/workflows/release-protobufs.yml
vendored
20
.github/workflows/release-protobufs.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user