From be078787c46955cdf32db7396c497e6d18a1a814 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Thu, 1 Aug 2024 01:53:32 -0400 Subject: [PATCH] Add NPM publish step to CI --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6fa478..a0d48b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: [push, pull_request, workflow_dispatch] jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write strategy: matrix: @@ -41,3 +44,9 @@ jobs: with: name: kj4ezj-is-${{ matrix.node-version }} path: kj4ezj-is-*.tgz + + - name: Publish to NPM + run: npm publish --provenance --access public + if: startsWith(github.ref, 'refs/tags/') + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}