Skip to content

Commit af9fd1b

Browse files
committed
Publish to npm automatically
1 parent b2641c5 commit af9fd1b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
],
6060
"devDependencies": {
6161
"async": "^2.1.4",
62+
"ci-publish": "^1.3.0",
6263
"download-manager": "^0.1.3",
6364
"fs-extra": "^1.0.0",
6465
"prebuild": "^6.0.0"

scripts/BigRedButton

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ tar -cf - ${PRODUCTS[@]} | gzip > $STEP_DIR || err 20
3838

3939

4040
#
41-
# Upload release to GitHub
41+
# Upload release to GitHub and npm
4242
#
4343

44-
if [ "$GITHUB_TOKEN" ]; then
45-
prebuild --upload-all $GITHUB_TOKEN || exit 30
44+
if [ "$BRANCH_NAME" = "master" ]; then
45+
if [ "$GITHUB_TOKEN" ]; then
46+
prebuild --upload-all $GITHUB_TOKEN || exit 30
47+
fi
48+
49+
if [ "$NPM_TOKEN" ]; then
50+
ci-publish
51+
fi
4652
fi
4753

4854
#

0 commit comments

Comments
 (0)