Skip to content

Commit

Permalink
workflow to publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
128keaton committed Jul 7, 2021
1 parent 7c9e39f commit f28f10e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js Package

on:
release:
types: [created]

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

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ lcov.info
coverage/lcov-report/

.DS_Store
test/coverage/*.xml
test/coverage/*.json
test/coverage/*.info
test/coverage/lcov-report
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@128keaton:registry=https://npm.pkg.github.com
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"dependencies": {
"qs": "^6.10.1"
},
"publishConfig": {
"@128keaton:registry": "https://npm.pkg.github.com"
},
"files": [
"dist"
]
Expand Down

0 comments on commit f28f10e

Please sign in to comment.