diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 00000000..d1d1f29d --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,32 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: yarn + - run: yarn test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + scope: '@mpth' + - run: yarn + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} +