Skip to content

Commit

Permalink
Fix: action
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Aug 6, 2021
1 parent 27c04e6 commit 9ced377
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
name: Publishing

on:
release:
types: [created]
push:
tags:
'v*'

jobs:
build:
Expand All @@ -31,6 +32,7 @@ jobs:
- run: pip install -r ./requirements.txt
- name: npm install
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm install
- run: npm ci --no-audit
- run: npm run build --if-present
env:
Expand All @@ -45,10 +47,10 @@ jobs:
matrix:
include:
- branch: master
token: ${{ secrets.NPM_TOKEN }}
token: NPM_TOKEN
registry: https://registry.npmjs.org/
- branch: github-repo
token: ${{ secrets.GITHUB_TOKEN }}
token: GITHUB_TOKEN
registry: https://npm.pkg.github.com/
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -84,4 +86,4 @@ jobs:
CI: true
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ matrix.token }}
NODE_AUTH_TOKEN: ${{ secrets[matrix.token] }}

0 comments on commit 9ced377

Please sign in to comment.