feat(semantic-release): set up deployment with semantic release

Install and configure commitlint
Configure semantic release to deploy in an additional stage, if on the develop branch
This commit is contained in:
rschamp 2021-08-06 15:40:36 -04:00
parent e9484b770b
commit 7e5150c0ca
3 changed files with 23 additions and 5 deletions

View file

@ -1,9 +1,23 @@
sudo: false
language: node_js
node_js:
- "8"
- "10"
- "node"
- 8
- 10
- node
cache:
directories:
- node_modules
script:
- commitlint-travis
- npm test
jobs:
include:
- stage: release
node_js: 10
script: echo deploying...
deploy:
- provider: script
script: npx semantic-release
stages:
- test
- name: release
if: branch = develop

1
commitlint.config.js Normal file
View file

@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}

View file

@ -1,6 +1,6 @@
{
"name": "scratch-analysis",
"version": "2.0.0",
"version": "0.0.0",
"description": "Analysis tool for summarizing the structure, composition, and complexity of Scratch programs.",
"main": "lib/index.js",
"directories": {
@ -20,6 +20,9 @@
"scratch-parser": "5.0.0"
},
"devDependencies": {
"@commitlint/cli": "13.1.0",
"@commitlint/config-conventional": "13.1.0",
"@commitlint/travis-cli": "13.1.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.10.0",
"eslint-config-scratch": "^5.0.0",