From f26c695aa665ecff5dbc38fb9e15a40cc6e24caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=D0=B0=D0=B0=D1=80=D1=82=D0=B5=D0=BD=20-=20Maarten?= Date: Sat, 23 Nov 2019 21:28:47 +0100 Subject: [PATCH] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/npm-publish.yml 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}} +