Update publish.yml
This commit is contained in:
parent
8ea980e96b
commit
e16b1c932c
|
@ -5,7 +5,7 @@ on:
|
|||
types: [created]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
publishnpm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
|
@ -16,6 +16,32 @@ jobs:
|
|||
node-version: 18
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: publish-npm
|
||||
run: npm publish --access public
|
||||
run: |
|
||||
# Change publish registry
|
||||
echo "$(jq '.publishConfig.registry = "https://registry.npmjs.org"' package.json)" > package.json
|
||||
# Publish package
|
||||
npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
||||
githubpackage:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
registry-url: https://npm.pkg.github.com
|
||||
- name: publish-github
|
||||
run: |
|
||||
# Change publish registry
|
||||
echo "$(jq '.publishConfig.registry = "https://npm.pkg.github.com"' package.json)" > package.json
|
||||
# Publish package
|
||||
npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
|
Loading…
Reference in New Issue