30 lines
885 B
YAML
30 lines
885 B
YAML
stages:
|
|
- build
|
|
|
|
lint:
|
|
image: nixery.dev/shell/diffutils/go/golangci-lint
|
|
stage: build
|
|
before_script:
|
|
- cp /share/go/bin/go /bin && mkdir /tmp # fix weirdness from nixery image
|
|
- mkdir -p /go/src/src/gitlab.com/signald/signald-go
|
|
- cp -r * /go/src/src/gitlab.com/signald/signald-go
|
|
- cd /go/src/src/gitlab.com/signald/signald-go
|
|
script:
|
|
- golangci-lint run
|
|
- go mod tidy
|
|
- diff --color=always go.mod "${CI_PROJECT_DIR}/go.mod"
|
|
- diff --color=always go.sum "${CI_PROJECT_DIR}/go.sum"
|
|
|
|
build:
|
|
stage: build
|
|
image: golang:latest
|
|
before_script:
|
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
|
- cd /go/src/gitlab.com/signald/signald-go
|
|
script:
|
|
- go build -o "${CI_PROJECT_DIR}/signald-cli" ./cmd/signald-cli
|
|
artifacts:
|
|
paths:
|
|
- signald-cli
|
|
expire_in: 1 month
|