This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
95 lines (85 loc) · 1.43 KB
/
.gitlab-ci.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
image: golang:1.15
stages:
- test
- build
- release
.pages:
stage: release
script:
- make vendor install
- make -C docs/examples all publish
.buildbase:
stage: build
needs:
- test
script:
- make clean
- make build -e GOOS=linux -e GOARCH=amd64
- make build -e GOOS=linux -e GOARCH=arm
- make build -e GOOS=darwin -e GOARCH=amd64
- make build -e GOOS=windows -e GOARCH=amd64
test:
stage: test
script:
- make clean test
build:development:
extends: .buildbase
artifacts:
paths:
- build
expire_in: 1 week
except:
- master
- tags
build:master:
extends: .buildbase
artifacts:
paths:
- build
expire_in: 6 mos
only:
- master
except:
- tags
build:tags:
variables:
VERSION: $CI_COMMIT_TAG
extends: .buildbase
artifacts:
paths:
- build
only:
- tags
publish:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- echo "Running a new release"
dependencies:
- build:tags
artifacts:
paths:
- build
release:
name: 'Release $CI_COMMIT_TAG'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'
description: See CHANGELOG.md
only:
- tags
pages:test:
extends: .pages
artifacts:
paths:
- public
expire_in: 1 week
except:
- master
pages:
extends: .pages
artifacts:
paths:
- public
expire_in: 6 mos
only:
- master