Skip to content

Commit

Permalink
Setup registry-url to read auth token from env
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Nov 25, 2020
1 parent dc37e14 commit f70626e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,24 @@ jobs:
name: dist
path: dist/
- run: rm .gitignore

# Publish to npm
- uses: actions/setup-node@v2-beta
- run: cd dist/natural && npm publish --access public
with:
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public dist/natural
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Setup .npmrc file to publish to GitHub Packages

# Publish to GitHub Packages
- uses: actions/setup-node@v2-beta
with:
registry-url: 'https://npm.pkg.github.com'
- run: cd dist/natural && npm publish --access public
- run: npm publish --access public dist/natural
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Create release
- name: Get release info
id: release-info
run: |
Expand Down

0 comments on commit f70626e

Please sign in to comment.