Skip to content

Instantly share code, notes, and snippets.

@larryli
Created May 17, 2018 09:39
Show Gist options
  • Save larryli/715f7cf9a2a679b35bc0ab7e179b2f79 to your computer and use it in GitHub Desktop.
Save larryli/715f7cf9a2a679b35bc0ab7e179b2f79 to your computer and use it in GitHub Desktop.
Gitlab CI build for go project
stages:
- build
compile:
stage: build
script:
- go build -ldflags "-s -w -X main.Version=$CI_COMMIT_TAG"
artifacts:
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
paths:
- $CI_PROJECT_NAME
only:
- tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment