ci: add trusted-publishing workflow for npm
amankumarsingh77 amankumarsingh7702@gmail.com
Sun, 21 Jun 2026 00:51:33 +0530
1 files changed,
28 insertions(+),
0 deletions(-)
jump to
A
.github/workflows/publish.yml
@@ -0,0 +1,28 @@
+name: Publish to npm + +on: + push: + tags: + - 'v*' + +permissions: + id-token: write # required for OIDC trusted publishing + contents: read + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: https://registry.npmjs.org + cache: npm + + - run: npm ci + + # prepublishOnly already runs tsc --noEmit + - run: npm publish