-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
308 additions
and
120 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,72 @@ | ||
name: Push new version to schema registry | ||
|
||
permissions: | ||
contents: read | ||
name: Publish to Cargo & JSR | ||
|
||
on: | ||
push: | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
push_to_registry: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
|
||
jobs: | ||
codegen: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Package Versions to current tag | ||
run: sed -i "s/__PACKAGE_VERSION__/$(echo $GITHUB_REF | cut -d '/' -f 3)/g" packages/ts/deno.json \ | ||
&& sed -i "s/__PACKAGE_VERSION__/$(echo $GITHUB_REF | cut -d '/' -f 3)/g" packages/rust/Cargo.toml | ||
- name: Setup Buf | ||
uses: bufbuild/buf-setup-action@v1.30.0 | ||
uses: bufbuild/buf-setup-action@main | ||
with: | ||
github_token: ${{ github.token }} | ||
- name: Generate code | ||
run: buf generate dewars | ||
- name: Copy license | ||
run: cp LICENSE packages/ts && cp LICENSE packages/rust | ||
- name: Upload Rust code | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rust_code | ||
path: packages/rust | ||
- name: Upload TypeScript code | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ts_code | ||
path: packages/ts | ||
|
||
- name: Push to schema registry | ||
# uses: bufbuild/buf-push-action@v1 | ||
# with: | ||
# buf_token: ${{ secrets.BUF_TOKEN }} | ||
run: | | ||
export BUF_TOKEN=${{ secrets.BUF_TOKEN }} | ||
buf push --tag ${{ github.ref_name }} | ||
publish-jsr: | ||
runs-on: ubuntu-24.04 | ||
needs: codegen | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Download TypeScript code | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ts_code | ||
- name: Set up Deno | ||
uses: denoland/setup-deno@main | ||
with: | ||
deno-version: rc | ||
- name: Publish to JSR | ||
run: deno publish --unstable-sloppy-imports | ||
|
||
publish-cargo: | ||
runs-on: ubuntu-24.04 | ||
needs: codegen | ||
steps: | ||
- name: Download Rust code | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rust_code | ||
- name: Set up Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Check Library | ||
run: cargo check | ||
- name: Publish to crates.io | ||
uses: katyo/publish-crates@v2 | ||
with: | ||
registry-token: ${{ secrets.CARGO_TOKEN }} | ||
ignore-unpublished-changes: true |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
packages/ts/lib/* | ||
packages/rust/src/generated/* | ||
packages/rust/target | ||
!.gitkeep |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v2 | ||
plugins: | ||
- remote: buf.build/bufbuild/es:v2.1.0 | ||
out: packages/ts/lib | ||
opt: target=ts | ||
- remote: buf.build/community/neoeinstein-prost:v0.4.0 | ||
out: packages/rust/src/generated | ||
- remote: buf.build/community/neoeinstein-prost-crate:v0.4.1 | ||
out: packages/rust/src/generated | ||
opt: no_features |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
version: v1 | ||
name: buf.build/meshtastic/protobufs | ||
deps: [] | ||
build: | ||
excludes: [] | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
ignore_only: | ||
PACKAGE_DEFINED: | ||
- nanopb.proto | ||
use: | ||
- MINIMAL | ||
version: v2 | ||
modules: | ||
- path: meshtastic | ||
name: buf.build/meshtastic/protobufs | ||
excludes: | ||
- meshtastic/device_only/ | ||
lint: | ||
use: | ||
- MINIMAL | ||
except: | ||
- PACKAGE_NO_IMPORT_CYCLE | ||
disallow_comment_ignores: true | ||
breaking: | ||
use: | ||
- FILE | ||
except: | ||
- EXTENSION_NO_DELETE | ||
- FIELD_SAME_DEFAULT |
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.