From de4e9e797d17593f11fb06524167b1a4559acd06 Mon Sep 17 00:00:00 2001 From: Priyansh Garg <39924567+garg3133@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:31:46 +0530 Subject: [PATCH] Auto-publish package to NPM on new tag push. (#14) --- .github/workflows/publish.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..422671d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish to NPM +on: + push: + tags: + - v* +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: npm install + - name: Publish package on NPM 📦 + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}