From 0825b68343a5d19404718c4a057c894fda7c623d Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Sun, 21 Jun 2026 00:51:33 +0530 Subject: ci: add trusted-publishing workflow for npm --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yml (limited to '.github/workflows') diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8ad665c --- /dev/null +++ b/.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 -- cgit v1.2.3