Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kcajmagic authored Dec 2, 2020
1 parent fcf2073 commit bf8df4b
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,22 +1,55 @@
language: go

go:
- 1.13.x
- 1.15.x
- tip

os:
- linux
- osx

matrix:
allow_failures:
- go: tip
fast_finish: true
services:
- docker

branches:
only:
- main

- /^v[0-9]+\.[0-9]+\.[0-9]+$/

script:
- make style codecov

jobs:
fast_finish: true
allow_failures:
- go: tip
include:
- stage: tag
name: "Tag For Release"
if: branch = main && type = push
before_script:
- echo -e "machine github.com\n login $GH_TOKEN" > ~/.netrc
script:
- export OLD_VERSION=$(make version)
- git config --global user.name "xmidt-bot"
- git config --global user.email "$BOT_EMAIL"
- export TAG=$(cat CHANGELOG.md | perl -0777 -ne 'print "$1" if /.*## \[Unreleased\]\s+## \[(v\d+.\d+.\d+)\].*/s')
- export TODAY=`date +'%m/%d/%Y'`
- export NOTES=$(cat CHANGELOG.md | perl -0777 -ne 'print "$ENV{TODAY}\n\n$1\n" if /.*## \[$ENV{TAG}\]\s(.*?)\s+## \[(v\d+.\d+.\d+)\].*/s')
- if [[ "$TAG" != "" && "$TAG" != "$OLD_VERSION" ]]; then git tag -a "$TAG" -m "$NOTES"; git push origin --tags; echo $?; fi
after_success: skip

- stage: release
name: "Make a Release"
if: branch != main
script: skip
before_deploy:
- make release-artifacts
deploy:
on:
all_branches: true
tags: true
provider: releases
api_key: "$GH_TOKEN"
file_glob: true
file: ./.ignore/*
skip_cleanup: true

0 comments on commit bf8df4b

Please sign in to comment.