From 59a70211a4a88c186918f4b7c9f315cc574a5e22 Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Wed, 3 Jul 2024 15:00:55 +0530 Subject: [PATCH] feat/ci: add support for package provenance on publish --- .github/workflows/publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c999433..9695497 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,10 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: - uses: actions/checkout@v4 # Setup .npmrc file to publish to npm @@ -19,6 +23,6 @@ jobs: node-version: '20.x' registry-url: 'https://registry.npmjs.org' - run: npm ci - - run: npm publish + - run: npm publish --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}