Skip to content

Commit

Permalink
build: automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 23, 2020
1 parent 7d388a3 commit 8d85c72
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 37 deletions.
31 changes: 0 additions & 31 deletions .bumpedrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ coverage
# Other
############################
.node_history
.envrc
30 changes: 27 additions & 3 deletions .travis.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
language: node_js

node_js:
- "lts/*"
- "node"
after_success: npm run coveralls
- lts/*
- node

after_success: npm run coverage

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:-"travis@travis-ci.org"}
- 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
40 changes: 37 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@
"nyc": "latest",
"should": "latest",
"standard": "latest",
"standard-markdown": "latest"
"standard-markdown": "latest",
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"husky": "latest",
"lint-staged": "latest",
"npm-check-updates": "latest",
"standard-version": "latest"
},
"engines": {
"node": ">= 6"
Expand All @@ -58,16 +68,40 @@
],
"scripts": {
"clean": "rm -rf node_modules",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "standard-markdown && standard",
"pretest": "npm run lint",
"test": "nyc mocha"
"test": "nyc mocha",
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"postrelease": "npm run release:tags && npm run release:github && ci-publish",
"prerelease": "npm run update:check && npm run contributors",
"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",
"standard": {
"globals": [
"describe",
"it"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"package.json": [
"finepack"
]
}
}

0 comments on commit 8d85c72

Please sign in to comment.