From f481998cf88794042da92076f040cf342a7571c7 Mon Sep 17 00:00:00 2001 From: Nenad Novakovic Date: Mon, 23 Jan 2023 18:55:44 +0100 Subject: [PATCH] build: add auto-deploy workflow --- .github/workflows/publish-package.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/publish-package.yml diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 0000000..cc0d5dd --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -0,0 +1,22 @@ +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: 16 + registry-url: 'https://registry.npmjs.org' + - uses: pnpm/action-setup@v2.2.4 + - run: pnpm i + - run: pnpm run test + - run: pnpm run build + - run: pnpm publish --no-git-checks --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}