forked from plus3it/terraform-aws-tardigrade-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (35 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dist: focal
language: minimal
stages:
- lint
- deploy
if: branch = master OR type = pull_request
jobs:
include:
- stage: lint
name: Project Syntax Verification
script: make docker/run target=lint
- stage: deploy
if: branch = master AND type = push AND repo = plus3it/terraform-aws-tardigrade-inspector
before_script:
- |
PRIOR_VERSION=$(git describe --abbrev=0 --tags)
RELEASE_VERSION=$(grep current_version $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //' )
RELEASE_BODY="* [TARDIGRADE-INSPECTOR v$RELEASE_VERSION CHANGELOG](https://github.com/plus3it/terraform-aws-tardigrade-inspector/blob/$RELEASE_VERSION/CHANGELOG.md)"
export PRIOR_VERSION RELEASE_VERSION RELEASE_BODY
script: skip
before_deploy:
- |
(set -x; git tag -a $RELEASE_VERSION -m $RELEASE_VERSION)
deploy:
provider: releases
api_key: $GH_RELEASES_TOKEN
name: $RELEASE_VERSION
body: $RELEASE_BODY
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
draft: false
on:
branch: master
repo: plus3it/terraform-aws-tardigrade-inspector
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'