Create npm-publish.yml

This commit is contained in:
xxDeveloper
2022-02-13 21:44:32 +03:00
committed by GitHub
parent 8a71f11353
commit b7b920a3ae

30
.github/workflows/npm-publish.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: NPM / Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}