kopia lustrzana https://github.com/meshtastic/protobufs
				
				
				
			
						commit
						e2ca3369e8
					
				|  | @ -14,12 +14,14 @@ jobs: | |||
|       - name: Checkout code | ||||
|         uses: actions/checkout@v4 | ||||
|       - name: debug | ||||
|         run: cat packages/ts/deno.json && cat packages/rust/Cargo.toml | ||||
|         run: cat packages/ts/deno.json && cat packages/rust/Cargo.toml && cat packages/ts/package.json | ||||
|       - 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/ts/package.json \ | ||||
|         #   && sed -i "s/__PACKAGE_VERSION__/$(echo $GITHUB_REF | cut -d '/' -f 3)/g" packages/rust/Cargo.toml | ||||
|         run: | | ||||
|           sed -i "s/__PACKAGE_VERSION__/2.7.0/g" packages/ts/deno.json | ||||
|           sed -i "s/__PACKAGE_VERSION__/2.7.0/g" packages/ts/package.json | ||||
|           sed -i "s/__PACKAGE_VERSION__/2.7.0/g" packages/rust/Cargo.toml | ||||
|       - name: Setup Buf | ||||
|         uses: bufbuild/buf-setup-action@main | ||||
|  | @ -67,6 +69,30 @@ jobs: | |||
|       - name: Publish to JSR | ||||
|         run: deno publish --unstable-sloppy-imports | ||||
| 
 | ||||
|   publish-npm: | ||||
|     runs-on: ubuntu-24.04 | ||||
|     permissions: | ||||
|       contents: read | ||||
|       id-token: write | ||||
|     steps: | ||||
|       - name: Download TypeScript code | ||||
|         uses: actions/download-artifact@v4 | ||||
|         with: | ||||
|           name: ts_code | ||||
|       - name: Install Node.js | ||||
|         uses: actions/setup-node@v5 | ||||
|         with: | ||||
|           node-version: lts/* | ||||
|           registry-url: https://registry.npmjs.org/ | ||||
|       - name: Install NPM dependencies | ||||
|         run: npm install | ||||
|       - name: Build JavaScript module | ||||
|         run: npm run build | ||||
|       - name: Publish NPM package | ||||
|         run: npm publish | ||||
|         env: | ||||
|           NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||||
| 
 | ||||
|   publish-cargo: | ||||
|     runs-on: ubuntu-24.04 | ||||
|     needs: codegen | ||||
|  |  | |||
|  | @ -1,4 +1,6 @@ | |||
| packages/ts/lib/* | ||||
| packages/ts/node_modules/ | ||||
| packages/ts/package-lock.json | ||||
| packages/rust/src/generated/* | ||||
| packages/rust/target | ||||
| packages/c/* | ||||
|  |  | |||
|  | @ -0,0 +1,32 @@ | |||
| { | ||||
|   "name": "@meshtastic/protobufs", | ||||
|   "description": "Protobuf definitions for the Meshtastic project", | ||||
|   "version": "__PACKAGE_VERSION__", | ||||
|   "homepage": "https://github.com/meshtastic/protobufs", | ||||
|   "license": "GPLV3", | ||||
|   "publishConfig": { | ||||
|     "access": "public" | ||||
|   }, | ||||
|   "type": "module", | ||||
|   "main": "./dist/mod.mjs", | ||||
|   "module": "./dist/mod.mjs", | ||||
|   "types": "./dist/mod.d.mts", | ||||
|   "dependencies": { | ||||
|     "@bufbuild/protobuf": "^2.2.3" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "tsdown": "^0.13.4", | ||||
|     "typescript": "^5.8.3" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "build": "tsdown" | ||||
|   }, | ||||
|   "tsdown": { | ||||
|     "entry": "mod.ts", | ||||
|     "dts": true, | ||||
|     "format": [ | ||||
|       "esm" | ||||
|     ], | ||||
|     "splitting": false | ||||
|   } | ||||
| } | ||||
		Ładowanie…
	
		Reference in New Issue
	
	 Ben Meadors
						Ben Meadors