From eff849e5a16a73f31afa2cfaea87fe8a51b9a76a Mon Sep 17 00:00:00 2001 From: Roman Onatskiy Date: Thu, 10 Feb 2022 01:33:29 +0200 Subject: [PATCH] Update actions script for publishing package to npm --- .github/workflows/publish-to-npm.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index a2a5ace..ec569c5 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -6,6 +6,17 @@ on: jobs: build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + publish-npm: + needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -13,7 +24,7 @@ jobs: with: node-version: 12 registry-url: https://registry.npmjs.org/ - - run: yarn install + - run: npm ci - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}