chore: update travis config
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
|
- cp ./scripts/.npmrc.template $HOME/.npmrc
|
||||||
- COVERAGE=true npm run test
|
- COVERAGE=true npm run test
|
||||||
- npm run codecov
|
- 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
|
- bash ./scripts/deploy-to-gh-pages.sh
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -134,13 +134,15 @@ function compile (modules) {
|
||||||
function tag () {
|
function tag () {
|
||||||
console.log('tagging')
|
console.log('tagging')
|
||||||
const { version } = packageJson
|
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 tag ${version}`)
|
||||||
execSync(`git push origin ${version}:${version}`)
|
execSync(`git push origin ${version}:${version}`)
|
||||||
execSync('git push origin master:master')
|
execSync('git push origin master:master')
|
||||||
console.log('tagged')
|
console.log('tagged')
|
||||||
}
|
}
|
||||||
|
|
||||||
function githubRelease () {
|
function githubRelease (done) {
|
||||||
const changlogFiles = [
|
const changlogFiles = [
|
||||||
path.join(cwd, 'CHANGELOG.en-US.md'),
|
path.join(cwd, 'CHANGELOG.en-US.md'),
|
||||||
path.join(cwd, 'CHANGELOG.zh-CN.md'),
|
path.join(cwd, 'CHANGELOG.zh-CN.md'),
|
||||||
|
@ -180,6 +182,8 @@ function githubRelease () {
|
||||||
tag_name: version,
|
tag_name: version,
|
||||||
name: version,
|
name: version,
|
||||||
body: changelog,
|
body: changelog,
|
||||||
|
}).then(() => {
|
||||||
|
done()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
gulp.task('check-git', (done) => {
|
gulp.task('check-git', (done) => {
|
||||||
|
@ -204,8 +208,9 @@ function publish (tagString, done) {
|
||||||
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
|
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
|
||||||
runCmd(publishNpm, args, (code) => {
|
runCmd(publishNpm, args, (code) => {
|
||||||
tag()
|
tag()
|
||||||
githubRelease()
|
githubRelease(() => {
|
||||||
done(code)
|
done(code)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue