mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 05:29:01 +08:00
chore: update travis config
This commit is contained in:
parent
427edd610e
commit
da57566533
@ -1,3 +0,0 @@
|
||||
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||
loglevel=info
|
||||
registry=https://registry.npmjs.org/
|
@ -8,7 +8,7 @@ script:
|
||||
- cp ./scripts/.npmrc.template $HOME/.npmrc
|
||||
- COVERAGE=true npm run test
|
||||
- npm run codecov
|
||||
- npm run pub-with-ci
|
||||
- if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci
|
||||
- bash ./scripts/deploy-to-gh-pages.sh
|
||||
env:
|
||||
matrix:
|
||||
|
@ -134,13 +134,15 @@ function compile (modules) {
|
||||
function tag () {
|
||||
console.log('tagging')
|
||||
const { version } = packageJson
|
||||
execSync(`git config --global user.email ${process.env.GITHUB_USER_EMAIL}`)
|
||||
execSync(`git config --global user.name ${process.env.GITHUB_USER_NAME}`)
|
||||
execSync(`git tag ${version}`)
|
||||
execSync(`git push origin ${version}:${version}`)
|
||||
execSync('git push origin master:master')
|
||||
console.log('tagged')
|
||||
}
|
||||
|
||||
function githubRelease () {
|
||||
function githubRelease (done) {
|
||||
const changlogFiles = [
|
||||
path.join(cwd, 'CHANGELOG.en-US.md'),
|
||||
path.join(cwd, 'CHANGELOG.zh-CN.md'),
|
||||
@ -180,6 +182,8 @@ function githubRelease () {
|
||||
tag_name: version,
|
||||
name: version,
|
||||
body: changelog,
|
||||
}).then(() => {
|
||||
done()
|
||||
})
|
||||
}
|
||||
gulp.task('check-git', (done) => {
|
||||
@ -204,8 +208,9 @@ function publish (tagString, done) {
|
||||
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
|
||||
runCmd(publishNpm, args, (code) => {
|
||||
tag()
|
||||
githubRelease()
|
||||
done(code)
|
||||
githubRelease(() => {
|
||||
done(code)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user