From fc1d8b19e6e6e2353fa44a4f7a108f9ef7b0c7d2 Mon Sep 17 00:00:00 2001 From: Marques Lee Date: Wed, 23 Nov 2022 06:50:59 -0800 Subject: [PATCH] Add github workflow to publish to NPM --- .github/workflows/publish.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a6c63b9 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,21 @@ +name: Publish to NPM + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 19.x + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 + run: npm ci && npm run build + - name: Publish package on NPM 📦 + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}