Skip to content

Commit

Permalink
testing package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 4, 2021
1 parent ec84016 commit d07a29a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,46 @@ on:

jobs:

publish:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm install
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '10'
registry-url: 'https://registry.npmjs.org'
node-version: 12
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm publish
- run: npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
node-version: 12
registry-url: https://npm.pkg.github.com
- run: npm install

# setting registry-url isn't currently working. This sets it, but still won't
# publish to GPR
- run: npm config set registry https://npm.pkg.github.com
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc

- run: npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ appveyor.yml
.eslintrc.yaml
.eslintrc.json
.nyc_output
coverage
coverage
.codeclimate.yml

0 comments on commit d07a29a

Please sign in to comment.