Skip to content

Commit d8265a2

Browse files
authored
Merge pull request #900 from danditomaso/npm-trusted-publishing
ci: switch NPM publish to npm trusted publishing (OIDC)
2 parents 97ea65a + 0962e05 commit d8265a2

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ jobs:
224224
runs-on: ubuntu-24.04
225225
needs: [codegen, build-typescript]
226226
if: ${{ !inputs.dry_run }}
227+
permissions:
228+
contents: read
229+
id-token: write
227230
steps:
228231
- name: Download NPM package
229232
uses: actions/download-artifact@v4
@@ -236,10 +239,11 @@ jobs:
236239
node-version: "22"
237240
registry-url: "https://registry.npmjs.org"
238241

242+
- name: Install NPM CLI
243+
run: npm install -g npm@latest
244+
239245
- name: Publish to NPM
240-
run: npm publish --access public
241-
env:
242-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
246+
run: npm publish
243247

244248
publish-jsr:
245249
runs-on: ubuntu-24.04

packages/ts/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"description": "Protobuf definitions for the Meshtastic project",
44
"version": "__PACKAGE_VERSION__",
55
"homepage": "https://github.com/meshtastic/protobufs",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/meshtastic/protobufs.git"
9+
},
610
"license": "GPLV3",
711
"publishConfig": {
812
"access": "public"

0 commit comments

Comments
 (0)