Skip to content

Commit a5b6875

Browse files
authored
Merge pull request #7 from jupitex/npm-publish
Add automatic publish to NPM
2 parents 3a2c023 + e8daaef commit a5b6875

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

appveyor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ environment:
2626
nan_version: 2.7.0
2727
pre_gyp_version: 0.6.39
2828
pre_gyp_github_version: 1.3.0
29+
publish_to_npm: true
2930

3031
cache:
3132
- '%APPDATA%\npm-cache'
@@ -36,6 +37,8 @@ install:
3637
- npm i nan@%nan_version%
3738
- npm install -g node-pre-gyp@%pre_gyp_version%
3839
- npm install -g node-pre-gyp-github@%pre_gyp_github_version%
40+
- ps: >-
41+
"//registry.npmjs.org/:_authToken=$env:npm_auth_token`n" | out-file "$env:userprofile\.npmrc" -Encoding ASCII
3942
4043
build_script:
4144
- node-pre-gyp configure
@@ -63,6 +66,9 @@ for:
6366
git config --global user.email "[email protected]"
6467
git config --global user.name "MatthD"
6568
node-pre-gyp-github publish --release
69+
if ($env:publish_to_npm){
70+
npm publish
71+
}
6672
}else
6773
{
6874
Write-Host "NODE_PRE_GYP_GITHUB_TOKEN missing. Not authorised to perform release."

0 commit comments

Comments
 (0)