This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add new grpc js client stubs generation CI workflow
- Loading branch information
1 parent
cc10168
commit 17d4450
Showing
4 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
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,45 @@ | ||
name: JS gRPC client stubs generation | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
js-grpc: | ||
name: JS gRPC client stubs generation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
cache-dependency-path: ./crates/topos-api/proto/package-lock.json | ||
registry-url: https://registry.npmjs.org | ||
scope: "@topos-network" | ||
|
||
- name: Install grpc-tool globally | ||
run: npm install -g grpc-tools | ||
|
||
- name: Generate client stubs | ||
working-directory: ./crates/topos-api/proto | ||
run: > | ||
mkdir generated && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/certificate.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/checkpoints.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/frost.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/stark_proof.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/subnet.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/shared/v1/uuid.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/uci/v1/certification.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/tce/v1/api.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/tce/v1/console.proto && | ||
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./generated --grpc_out=grpc_js:./generated topos/tce/v1/synchronization.proto | ||
- name: Publish npm package | ||
working-directory: ./crates/topos-api/proto | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
|
@@ -61,5 +61,3 @@ jobs: | |
- run: cargo nextest run cert_delivery --locked --no-default-features -F tce | ||
env: | ||
RUST_LOG: topos=info | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,26 @@ | ||
{ | ||
"name": "@topos-network/topos-grpc-client-stub", | ||
"version": "0.1.0-rc2", | ||
"description": "JavaScript gRPC client stub for topos-api", | ||
"files": [ | ||
"generated" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/topos-network/topos.git" | ||
}, | ||
"keywords": [ | ||
"grpc", | ||
"api", | ||
"topos", | ||
"client", | ||
"stub", | ||
"javascript" | ||
], | ||
"author": "Sebastien Dan <sebastien.dan@gmail.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/topos-network/topos/issues" | ||
}, | ||
"homepage": "https://github.com/topos-network/topos#readme" | ||
} |