-
Notifications
You must be signed in to change notification settings - Fork 39
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
Build and attach {amd,arm}64 binaries to releases #339
Conversation
- run: go build ./cmd/syncv3 -o build/syncv3_linux_${{ matrix.arch }} | ||
env: | ||
GOARCH: ${{ matrix.arch }} | ||
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 |
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.
Synapse uses this. There is the official-looking https://github.com/actions/upload-release-asset, but this has been archived and now recomments softprops' action.
name: "Build and attach binary to release" | ||
on: | ||
release: | ||
types: ["created"] |
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://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
FTR the types are
- published
- unpublished
- created
- edited
- deleted
- prereleased
- released
- run: mkdir build | ||
- run: go build -o build/syncv3_linux_${{ matrix.arch }} ./cmd/syncv3 | ||
env: | ||
GOARCH: ${{ matrix.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.
Technically we should also have GOOS: linux
.
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 assumed that would be inherited from the fact that we're running on ubuntu, but I can make that explicit.
Let's see how this works in practice. |
Oh ffs:
from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release |
Which contradicts https://docs.github.com/en/webhooks/webhook-events-and-payloads#release
|
Completely untested. Cribbed a little from Synapse's CI but kept simple.
I suggest
I also ran this through https://github.com/rhysd/actionlint which reported no complaints.
Fixes #334.