Update npm-publish.yml

This commit is contained in:
Killer069 2021-11-06 18:41:26 +05:30 committed by GitHub
parent 22c8d66461
commit b17aef0ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +1,18 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Node.js Package name: Node.js Package
on: on:
release: release:
types: [released] types: [created]
jobs: jobs:
build:
publish-npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
node-version: 16 node-version: 16
registry-url: https://registry.npmjs.org/ registry-url: 'https://registry.npmjs.org'
- run: npm ci - run: npm install
- run: npm publish - run: npm publish
env: env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}