File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,7 @@ const filesList = files.split( ',' );
1212
1313utils . log ( `Releasing ${ process . env . CIRCLE_PROJECT_REPONAME } …` ) ;
1414
15- const shouldPublishOnNPM = Boolean ( process . env . NPM_TOKEN ) ;
16-
17- if ( shouldPublishOnNPM ) {
18- utils . log ( `Will publish on npm` ) ;
19- }
15+ let shouldPublishOnNPM = Boolean ( process . env . NPM_TOKEN ) ;
2016
2117const getConfig = ( { gitBranchName } ) => {
2218 const branchType = gitBranchName . split ( "/" ) [ 0 ] ;
@@ -35,6 +31,12 @@ const getConfig = ({ gitBranchName }) => {
3531 githubConfig . failComment = false ;
3632 }
3733
34+ // Only publish alpha and release branches to NPM.
35+ shouldPublishOnNPM = shouldPublishOnNPM && [ "alpha" , "release" ] . includes ( branchType ) ;
36+ if ( shouldPublishOnNPM ) {
37+ utils . log ( `Will publish to npm.` ) ;
38+ }
39+
3840 const config = {
3941 dryRun : otherArgs . dryRun ,
4042 ci : otherArgs . ci ,
You can’t perform that action at this time.
0 commit comments