From e673d976537ecf50d0c4f01d5c854093d15b7a9a Mon Sep 17 00:00:00 2001 From: Gabe Berke-Williams Date: Tue, 5 Dec 2023 09:13:27 -0800 Subject: [PATCH] Automatically publish each release to NPM The `NPM_TOKEN` secret will expire on 2024-03-06, so we should figure out something repeatable before then. --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ae190d..59a1732 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,3 +25,12 @@ jobs: file: ./${{ steps.branch_name.outputs.TARBALL }} asset_name: ${{ steps.branch_name.outputs.TARBALL }} tag: ${{ github.ref }} + - name: Set up .npmrc file to publish to NPM + uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - name: Publish release to NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}