diff --git a/.github/workflows/deployOnNPM.yml b/.github/workflows/deployOnNPM.yml new file mode 100644 index 00000000..b95d0883 --- /dev/null +++ b/.github/workflows/deployOnNPM.yml @@ -0,0 +1,30 @@ +name: Publish npm package + +on: + push: + branches: + - develop + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '14' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm install + + - name: Build (if required) + run: npm run build + + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}