Skip to content

Commit

Permalink
Merge pull request #3 from myii/myii-patch-1
Browse files Browse the repository at this point in the history
ci(travis): prevent `release` stage running for PRs
  • Loading branch information
myii authored Feb 24, 2019
2 parents c6ac8aa + 8be509d commit 3674e37
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
language: node_js
node_js: lts/*
stages:
- commitlint
- name: release
if: branch = master AND type != pull_request

install:
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
jobs:
include:
# Define the commitlint stage
- stage: commitlint
language: node_js
node_js: lts/*
before_install: skip
script:
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Define the release stage that runs semantic-release
- stage: release
language: node_js
node_js: lts/*
before_install: skip
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
- go get github.com/myii/maintainer
- maintainer contributor

# Update Tables of Content in the relevant `.md` files
- npm install markdown-toc -D
- markdown-toc -i README.md

# Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D
- npm install @semantic-release/exec@3 -D
- npm install @semantic-release/git@7 -D
deploy:
provider: script
skip_cleanup: true
script:
# Run `semantic-release`
- npx semantic-release@15

script:
- commitlint-travis

# jobs:
# include:
Expand Down

0 comments on commit 3674e37

Please sign in to comment.