From d978d0b450059cdd46494027ef64e6a40f5758de Mon Sep 17 00:00:00 2001 From: Gerard Paapu Date: Thu, 16 Feb 2023 10:43:08 +1300 Subject: [PATCH] feat: add publishing workflow --- .github/workflows/publish-to-npm.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/publish-to-npm.yml diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 0000000..becfba3 --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,18 @@ +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}