Skip to content

Commit

Permalink
Travis release trigger (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboucquez authored Feb 1, 2021
1 parent 362719a commit d1d1a5b
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,21 @@ node_js:
cache:
directories:
- "node_modules"
env:
global:
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
before_script:
- npm install -g yaml-cli
- npm install
script:
- npm run build
- npm test
- npm run postman
- npm run version:prepare
- npm run version:pack
script:
- npm test
deploy:
- provider: script
skip_cleanup: true
script: /bin/sh travis/githubPages.sh
on:
branch: main
- provider: script
skip_cleanup: true
script: /bin/sh travis/release.sh
on:
branch: $RELEASE_BRANCH
- provider: releases
skip_cleanup: true
file:
Expand All @@ -32,3 +27,16 @@ deploy:
api_key: $GITHUB_TOKEN
on:
tags: true
jobs:
include:
- stage: test
name: test
script: npm test
- stage: deploy
name: githubPages
script: /bin/sh travis/githubPages.sh
if: branch = env(RELEASE_BRANCH) AND type = push
- stage: release
name: release
script: /bin/sh travis/release.sh
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)

0 comments on commit d1d1a5b

Please sign in to comment.