From 1e9329a513ff090857d353ba00d00091f101f73e Mon Sep 17 00:00:00 2001 From: baldarn Date: Wed, 4 Jan 2023 08:46:11 +0100 Subject: [PATCH] added automatic publication of npm package --- .github/workflows/release-package.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release-package.yml diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 00000000..ee6ab4f1 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,26 @@ +name: Release Package + +on: + release: + types: [created] + +jobs: + github-package-registry: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Publish package to npm package registry + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}