-
Notifications
You must be signed in to change notification settings - Fork 74
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
Migrate GitHub build action to use GoReleaser #27
Conversation
``` | ||
go build -ldflags "-X main.version=" | ||
|
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.
`1.0.0` is used as an example here, replace that with the version of the file you downloaded. | |
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.
Not needed if name_template
is used
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.
We should use the name template as is if we have the ambition to publish it to an apt repo. In that case, you want the files to be distinctive in order to work with multiple versions.
wrap_in_directory: true | ||
files: |
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.
wrap_in_directory: true | |
files: | |
wrap_in_directory: true | |
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ end }}' | |
files: |
If we do not add the version to the file, instructions become simpler, and you can have a direct link to the latest asset.
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.
I don't agree with that, as the goal should be publishing it in an apt repository.
We also can't link directly, as there are multiple architectures available.
PS: The suggested name template would probably fail, as we have multiple of the same architecture (different arm versions, but still a single arm arch)
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.
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
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.
Looks good to me
This PR migrates the GitHub Action for building the OS Agent to use GoReleaser.
Possible future improvements (needs more testing):
I left the latter 2 out of scope for this PR, mainly to get something going.
Testing: I've been playing with the result and development on a fork
https://github.com/frenck/os-agent/releases/tag/1.8.0