Npm and GPR samples

This commit is contained in:
Danny McCormick 2019-08-06 17:58:43 -04:00 committed by GitHub
parent 40a00ae373
commit 6b34be1bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,21 +39,27 @@ jobs:
- run: npm test - run: npm test
``` ```
Set up auth with npm: Publish to npmjs and GPR with npm:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
version: '10.x' version: '10.x'
registry-url: <registry url> registry-url: 'https://registry.npmjs.org'
- run: npm install - run: npm install
- run: npm publish - run: npm publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
Set up auth with yarn: Publish to npmjs and GPR with yarn:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
@ -66,6 +72,12 @@ steps:
- run: yarn publish - run: yarn publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }}
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
# License # License