prometheus-fail2ban-exporter/.gitlab-ci.yml
Hector 88be0f358e ci: add build stage to gitlab ci/cd (#6)
Update the Gitlab CI/CD process to include a build stage that uses
`goreleaser` to build and package the application. The output of the build
is stored as an artifact for 1 day.
2021-02-07 10:51:43 +00:00

35 lines
423 B
YAML

image: golang:latest
before_script:
- make install-deps
stages:
- test
- build
format:
stage: test
script:
- make format
dependencies:
stage: test
script:
- make go-mod-tidy
test:
stage: test
script:
- make test
build:
stage: build
script:
- git fetch --tags
- make build/snapshot
artifacts:
paths:
- dist/*.tar.gz
- dist/checksums.txt
expire_in: 1 day