-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(publish): compile Windows release on Windows #806
Conversation
@@ -1,7 +1,6 @@ | |||
name: Test and Release Go CLI | |||
|
|||
on: | |||
push: | |||
on: [push] |
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.
This is just a way to write the same things with a different syntax, and I prefer this one.
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 think, ./.goreleaser.yaml
file needs some modification to remove windows OS support.
.github/workflows/publish.yml
Outdated
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }}/dist |
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.
Is this debug?
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.
oups, yes
with: | ||
go-version-file: "go.mod" | ||
check-latest: true | ||
cache: 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.
Out of curiosity, what is the use of this cache
property?
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.
https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs
The action has a built-in functionality for caching and restoring go modules and build outputs.
It should speed up a bit the CI execution.
01c8b41
to
d909b19
Compare
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.
LGTM
With this PR, the
publish
action has two different jobs for the GoReleaser execution:releases-windows
: execute GoReleaser on a Windows server so that we don't use Go cross compile feature. This is to prevent issues such as the one described in [windows] The CLI doesn't work at all on Windows with command that require an input from the user #734.releases
: execute GoReleaser on a Ubuntu server for OpenBSD, Linux and macOS using Go cross compile feature.All these features are added as assets of a single GitHub release. You can see an example of execution on my fork: https://github.com/EtienneM/cli/releases/tag/1.25.2-beta8. One of the cons from my perspective is that we have two different files for the checksums.
Related to #734 and #735
Add a changelog entry in the section "To Be Released" of CHANGELOG.mdno changelog entry, this is an internal change