From b83e5afbb87ef9dbf3d53466f67a8746f12eb1c6 Mon Sep 17 00:00:00 2001 From: Khr2003 Date: Sat, 14 Sep 2024 11:14:12 +1000 Subject: [PATCH] feat: add npm publish workflow --- .github/workflows/publish-npm.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..0113b0b --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,29 @@ +name: Publish to NPM registry + +on: + push: + branches: ["master"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + registry-url: https://registry.npmjs.org/ + + - name: Setup pnpm and install dependencies + uses: pnpm/action-setup@v4 + with: + version: latest + run_install: true + + - name: Publish package + run: pnpm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}