From ce5c71c7ebfbb4f5f386d5d4c8352432eded21ad Mon Sep 17 00:00:00 2001 From: Paul Maddox Date: Sat, 9 Mar 2019 12:01:51 +0400 Subject: [PATCH 1/2] fix(CI): Update TravisCI configuration based on https://github.com/semantic-release/semantic-release/issues/1102 --- .travis.yml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26e908857c..f11d0d5a77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,19 +12,37 @@ env: install: true -after_success: - # Check for updated CloudFormation resources, and submit a PR - - test "${TRAVIS_EVENT_TYPE}" = "cron" && ./generate/create-pull-request.sh - # - ./generate/create-pull-request.sh +# after_success: +# # Check for updated CloudFormation resources, and submit a PR +# - test "${TRAVIS_EVENT_TYPE}" = "cron" && ./generate/create-pull-request.sh +# # - ./generate/create-pull-request.sh jobs: include: + # Define a stage that will auto-generate CloudFormation resources from the official + # AWS CloudFormation Resource Specification on a daily basis (run via a travis cron) + - stage: regenerate + script: test "${TRAVIS_EVENT_TYPE}" = "cron" && ./generate/create-pull-request.sh + # 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 + + # 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: - # Use nvm to install and use the Node LTS version (nvm is installed on all Travis images) - - nvm install lts/* - - npx semantic-release + # Run `semantic-release` + - npx semantic-release@15 From fc819c48eca94582d8d28aabd824d9aeb1fec8cd Mon Sep 17 00:00:00 2001 From: Paul Maddox Date: Sat, 9 Mar 2019 14:23:35 +0400 Subject: [PATCH 2/2] fix(CI): Updated generate job to use travis conditionals --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f11d0d5a77..8f33cb4bfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,8 @@ jobs: # Define a stage that will auto-generate CloudFormation resources from the official # AWS CloudFormation Resource Specification on a daily basis (run via a travis cron) - stage: regenerate - script: test "${TRAVIS_EVENT_TYPE}" = "cron" && ./generate/create-pull-request.sh + if: type = cron + script: generate/create-pull-request.sh # Define the release stage that runs semantic-release - stage: release