-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
66 lines (63 loc) · 1.92 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
os: linux
dist: focal
sudo: false
_go_build: &go_build
language: go
go: 1.19.x
go_import_path: github.com/syberalexis/linky-exporter
script: BUILD_GO111MODULE=on GOOS=${BUILD_GOOS} GOARCH=${BUILD_GOARCH} GOARM=${BUILD_GOARM} make clean build
if: branch == master OR type == pull_request OR tag IS present
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file_glob: true
file: dist/*
skip_cleanup: true
on:
branch: master
tags: true
matrix:
include:
# GO builds
### Linux
- <<: *go_build
env: BUILD_GOOS=linux BUILD_GOARCH=amd64
- <<: *go_build
env: BUILD_GOOS=linux BUILD_GOARCH=arm BUILD_GOARM=5
- <<: *go_build
env: BUILD_GOOS=linux BUILD_GOARCH=arm BUILD_GOARM=6
- <<: *go_build
env: BUILD_GOOS=linux BUILD_GOARCH=arm BUILD_GOARM=7
- <<: *go_build
env: BUILD_GOOS=linux BUILD_GOARCH=arm64
### OpenBSD
- <<: *go_build
env: BUILD_GOOS=openbsd BUILD_GOARCH=amd64
- <<: *go_build
env: BUILD_GOOS=openbsd BUILD_GOARCH=arm BUILD_GOARM=5
- <<: *go_build
env: BUILD_GOOS=openbsd BUILD_GOARCH=arm BUILD_GOARM=6
- <<: *go_build
env: BUILD_GOOS=openbsd BUILD_GOARCH=arm BUILD_GOARM=7
- <<: *go_build
env: BUILD_GOOS=openbsd BUILD_GOARCH=arm64
### Windows
- <<: *go_build
env: BUILD_GOOS=windows BUILD_GOARCH=amd64
- <<: *go_build
env: BUILD_GOOS=windows BUILD_GOARCH=arm BUILD_GOARM=5
- <<: *go_build
env: BUILD_GOOS=windows BUILD_GOARCH=arm BUILD_GOARM=6
- <<: *go_build
env: BUILD_GOOS=windows BUILD_GOARCH=arm BUILD_GOARM=7
# Docker build
- script:
- make docker
deploy:
provider: script
script: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin ; docker push -a syberalexis/linky-exporter
on:
branch: master
tags: true
notifications:
email: false