File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 8
8
- cp ./scripts/.npmrc.template $HOME/.npmrc
9
9
- COVERAGE=true npm run test
10
10
- npm run codecov
11
- - npm run pub-with-ci
11
+ - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci
12
12
- bash ./scripts/deploy-to-gh-pages.sh
13
13
env :
14
14
matrix :
Original file line number Diff line number Diff line change @@ -134,13 +134,15 @@ function compile (modules) {
134
134
function tag ( ) {
135
135
console . log ( 'tagging' )
136
136
const { version } = packageJson
137
+ execSync ( `git config --global user.email ${ process . env . GITHUB_USER_EMAIL } ` )
138
+ execSync ( `git config --global user.name ${ process . env . GITHUB_USER_NAME } ` )
137
139
execSync ( `git tag ${ version } ` )
138
140
execSync ( `git push origin ${ version } :${ version } ` )
139
141
execSync ( 'git push origin master:master' )
140
142
console . log ( 'tagged' )
141
143
}
142
144
143
- function githubRelease ( ) {
145
+ function githubRelease ( done ) {
144
146
const changlogFiles = [
145
147
path . join ( cwd , 'CHANGELOG.en-US.md' ) ,
146
148
path . join ( cwd , 'CHANGELOG.zh-CN.md' ) ,
@@ -180,6 +182,8 @@ function githubRelease () {
180
182
tag_name : version ,
181
183
name : version ,
182
184
body : changelog ,
185
+ } ) . then ( ( ) => {
186
+ done ( )
183
187
} )
184
188
}
185
189
gulp . task ( 'check-git' , ( done ) => {
@@ -204,8 +208,9 @@ function publish (tagString, done) {
204
208
const publishNpm = process . env . PUBLISH_NPM_CLI || 'npm'
205
209
runCmd ( publishNpm , args , ( code ) => {
206
210
tag ( )
207
- githubRelease ( )
208
- done ( code )
211
+ githubRelease ( ( ) => {
212
+ done ( code )
213
+ } )
209
214
} )
210
215
}
211
216
You can’t perform that action at this time.
0 commit comments