From 916d9415e5d14495f4ad93f3563fe0d325c7aa87 Mon Sep 17 00:00:00 2001 From: Thomas Brodusch Date: Thu, 22 Dec 2022 17:56:09 +0100 Subject: [PATCH] ci: implement CD to auto-publish on NPM --- .github/workflows/cd.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..711ad7d --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,22 @@ +name: Publish to NPM +on: + release: + types: [created] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 + run: npm install && npm run build + - name: Publish package to NPM 📦 + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}