Update npm-publish.yml

This commit is contained in:
Mostafa Soufi
2022-09-18 13:33:35 +04:30
committed by GitHub
parent 4e62514426
commit 40b7448975

View File

@@ -7,23 +7,16 @@ on:
push: push:
branches: branches:
- master - master
jobs: jobs:
build: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16.x' node-version: 12
registry-url: 'https://npm.pkg.github.com' - run: npm install
# Defaults to the user or organization that owns the workflow file - run: npm test
scope: '@octocat' - uses: JS-DevTools/npm-publish@v1
- run: npm ci with:
- run: npm publish token: ${{ secrets.NPM_TOKEN }}
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}