Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
build: add automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jul 2, 2019
1 parent 644cefd commit 6dff8d1
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ coverage
# Other
############################
.node_history
.envrc
30 changes: 24 additions & 6 deletions .travis.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
language: node_js

node_js:
- "node"
- "lts/*"
- "10"
- "8"
- "6"
- "4"
- lts/*

stages:
- Test
- name: Release
if: branch = master AND commit_message !~ /(release|no-release)/

jobs:
include:
- stage: Release
node_js: lts/*
install: npm install --no-package-lock
before_deploy:
- git config user.email ${GITHUB_EMAIL:-"[email protected]"}
- git config user.name ${GITHUB_USER:-"Travis CI"}
- git remote set-url origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git checkout master
deploy:
skip_cleanup: true
provider: script
script: npm run release
on:
branch: master
42 changes: 39 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@
},
"devDependencies": {
"git-dirty": "latest",
"standard": "latest"
"standard": "latest",
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"conventional-github-releaser": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"husky": "latest",
"lint-staged": "latest",
"npm-check-updates": "latest",
"standard-version": "latest",
"ci-publish": "latest"
},
"engines": {
"node": ">= 0.10"
Expand All @@ -50,7 +60,33 @@
"clean": "rm -rf node_modules",
"lint": "standard",
"pretest": "npm run lint",
"test": "echo 'no test'"
"test": "echo 'no test'",
"postrelease": "npm run release:tags && npm run release:github && ci-publish",
"prerelease": "npm run update:check",
"release:github": "conventional-github-releaser -p angular",
"release:tags": "git push --follow-tags origin HEAD:master",
"release": "standard-version -a",
"update:check": "ncu -- --error-level 2",
"update": "ncu -u"
},
"license": "MIT"
"license": "MIT",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"package.json": [
"finepack",
"git add"
]
}
}
}

0 comments on commit 6dff8d1

Please sign in to comment.