sudo: required

language: go
go:
  - 1.14.x

addons:
  apt:
    packages:
    - git
    - make
    - curl

env:
  - DOCKER_IMAGE_NAME=cloudposse/prometheus-to-cloudwatch

services:
- docker

install:
- make init
- make travis/docker-login
- make go/deps-dev

script:
- make lint
- make go/build-all
- ls -l release/
- make docker/build

after_success:
- make travis/docker-tag-and-push

deploy:
  - provider: releases
    api_key: "$GITHUB_API_KEY"
    file_glob: true
    file: "release/*"
    skip_cleanup: true
    on:
      tags: true
