-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use go releaser to publish binaries on new tags #498
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,38 @@ | ||
version: 2 | ||
version: 2.1 | ||
workflows: | ||
pr_acceptance: | ||
jobs: | ||
- test | ||
- build | ||
build_accept_deploy: | ||
jobs: | ||
- test | ||
- build | ||
- package: | ||
requires: | ||
- build | ||
- deploy: | ||
requires: | ||
- test | ||
- build | ||
- package | ||
publish_release: | ||
jobs: | ||
- test: | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*(-.*)*/ | ||
- github_binaries: | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*(-.*)*/ | ||
|
||
jobs: | ||
test: | ||
working_directory: /home/circleci/go/src/github.com/grafana/carbon-relay-ng | ||
|
@@ -96,21 +130,12 @@ jobs: | |
|
||
docker push grafana/carbon-relay-ng:$tag | ||
fi | ||
workflows: | ||
version: 2 | ||
pr_acceptance: | ||
jobs: | ||
- test | ||
- build | ||
build_accept_deploy: | ||
jobs: | ||
- test | ||
- build | ||
- package: | ||
requires: | ||
- build | ||
- deploy: | ||
requires: | ||
- test | ||
- build | ||
- package | ||
|
||
github_binaries: | ||
docker: | ||
- image: cimg/go:1.18 | ||
steps: | ||
- checkout | ||
- run: curl -sfL https://goreleaser.com/static/run | bash | ||
# For dry runs use the following and comment the above | ||
# - run: curl -sfL https://goreleaser.com/static/run | bash -s -- --rm-dist --skip-publish --snapshot | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Took me a few minutes to find out how to do a dry run so I think this comment adds value for future us if we run into any issue |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
builds: | ||
- id: "carbon-relay-ng" | ||
main: ./cmd/carbon-relay-ng | ||
binary: carbon-relay-ng | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. amd64 only arch supported today because we ran into issues when compiling to arm due to our metrictank dependency |
||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
skip: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to repeat the filtering in both jobs because there is no way to filter an entire workflow