Skip to content

Commit

Permalink
Add Github action for package publishing, fix prepublish script
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdee committed Jan 13, 2022
1 parent e605fdc commit 37cbec4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Denomo to NPM
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"scripts": {
"build": "tsc",
"lint": "eslint",
"prepublish": "npm run build",
"prepublishOnly": "npm run build",
"pretest": "npm run build",
"test": "mocha \"build/tests/*.spec.js\""
},
Expand Down

0 comments on commit 37cbec4

Please sign in to comment.