Update npm-publish.yml

This commit is contained in:
Jyotirmoy Bandyopadhayaya 2021-07-15 11:22:16 +05:30 committed by GitHub
parent 3e6acdf594
commit 87e8da801c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 11 deletions

View File

@ -9,26 +9,36 @@ on:
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: borales/actions-yarn@v2.3.0
with:
node-version: 14
- run: npm ci
- run: npm test
cmd: install # will run `yarn install` command
- uses: borales/actions-yarn@v2.3.0
with:
cmd: build # will run `yarn build` command
- uses: borales/actions-yarn@v2.3.0
with:
cmd: test # will run `yarn test` command
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: borales/actions-yarn@v2.3.0
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
cmd: install # will run `yarn install` command
- uses: borales/actions-yarn@v2.3.0
with:
cmd: build # will run `yarn build` command
- uses: borales/actions-yarn@v2.3.0
with:
cmd: test # will run `yarn test` command
- uses: borales/actions-yarn@v2.3.0
with:
auth-token: ${{ secrets.npm_token }}
registry-url: registry.npmjs.org