From af611a91a15a003c345f947042b584e433bdc643 Mon Sep 17 00:00:00 2001 From: Abraham Williams <4braham@gmail.com> Date: Sat, 8 Mar 2025 16:28:51 -0500 Subject: [PATCH] Add publishing to NPM with provenance --- .github/workflows/publsh.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/publsh.yaml diff --git a/.github/workflows/publsh.yaml b/.github/workflows/publsh.yaml new file mode 100644 index 0000000..9907f86 --- /dev/null +++ b/.github/workflows/publsh.yaml @@ -0,0 +1,20 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + - run: npm i + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}