Skip to content

Commit b71e2b6

Browse files
Merge pull request #60 from veryfi/feature/LP-1187-Add-new-step-to-deploy-nodejs-package-to-our-npm
Update npm-publish.yml
2 parents a29c7d5 + 2a3cdf4 commit b71e2b6

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,20 @@ jobs:
2727
node-version: 16
2828
registry-url: https://registry.npmjs.org/
2929
- run: npm ci
30+
- run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
34+
publish-nexus:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-node@v3
40+
with:
41+
node-version: 16
42+
- run: npm ci
3043
- run: npm config set "@veryfi:registry" "https://nexus.veryfi.com/repository/npm/"
3144
- run: npm config set "//nexus.veryfi.com/repository/npm/:username" "${{ secrets.NEXUS_NPM_USERNAME }}"
3245
- run: npm config set "//nexus.veryfi.com/repository/npm/:_password" "${{ secrets.NEXUS_NPM_PASSWORD }}"
3346
- run: npm publish
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"scripts": {
88
"test": "jest",
99
"doc": "jsdoc -d docs --configure jsconf.json main.js",
10-
"generate-docs": "jsdoc --configure jsdoc.json --verbose",
11-
"postpublish": "npm run publish-npm",
12-
"publish-npm": "npm publish --access public --ignore-scripts --@veryfi:registry='https://registry.npmjs.org'"
10+
"generate-docs": "jsdoc --configure jsdoc.json --verbose"
1311
},
1412
"author": "Veryfi <support@veryfi.com> (https://www.veryfi.com)",
1513
"homepage": "https://veryfi.github.io/veryfi-nodejs/",

0 commit comments

Comments
 (0)