forked from anasinnyk/terraform-provider-onepassword
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
25 lines (25 loc) · 811 Bytes
/
.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
language: go
dist: trusty
sudo: false
env:
global:
- BUILD_GOARCH=amd64
- GOPROXY=https://proxy.golang.org
matrix:
- BUILD_GOOS=linux
- BUILD_GOOS=darwin
- BUILD_GOOS=windows
install: true
script:
- env GO111MODULE=on GOOS=$BUILD_GOOS GOARCH=$BUILD_GOARCH go build -ldflags "-X main.versionNumber=$TRAVIS_TAG" -o release/terraform-provider-onepassword_v$TRAVIS_TAG
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
- chmod +x release/terraform-provider-onepassword_v$TRAVIS_TAG
- tar -cvzf release/terraform-provider-onepassword-$BUILD_GOOS-$BUILD_GOARCH.tar.gz -C release/ terraform-provider-onepassword_v$TRAVIS_TAG
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_OAUTH_TOKEN
file:
- release/terraform-provider-onepassword-$BUILD_GOOS-$BUILD_GOARCH.tar.gz
on:
tags: true