Skip to content

Commit da57566

Browse files
committed
chore: update travis config
1 parent 427edd6 commit da57566

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.npmrc.template

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ script:
88
- cp ./scripts/.npmrc.template $HOME/.npmrc
99
- COVERAGE=true npm run test
1010
- npm run codecov
11-
- npm run pub-with-ci
11+
- if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci
1212
- bash ./scripts/deploy-to-gh-pages.sh
1313
env:
1414
matrix:

antd-tools/gulpfile.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,15 @@ function compile (modules) {
134134
function tag () {
135135
console.log('tagging')
136136
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}`)
137139
execSync(`git tag ${version}`)
138140
execSync(`git push origin ${version}:${version}`)
139141
execSync('git push origin master:master')
140142
console.log('tagged')
141143
}
142144

143-
function githubRelease () {
145+
function githubRelease (done) {
144146
const changlogFiles = [
145147
path.join(cwd, 'CHANGELOG.en-US.md'),
146148
path.join(cwd, 'CHANGELOG.zh-CN.md'),
@@ -180,6 +182,8 @@ function githubRelease () {
180182
tag_name: version,
181183
name: version,
182184
body: changelog,
185+
}).then(() => {
186+
done()
183187
})
184188
}
185189
gulp.task('check-git', (done) => {
@@ -204,8 +208,9 @@ function publish (tagString, done) {
204208
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
205209
runCmd(publishNpm, args, (code) => {
206210
tag()
207-
githubRelease()
208-
done(code)
211+
githubRelease(() => {
212+
done(code)
213+
})
209214
})
210215
}
211216

0 commit comments

Comments
 (0)