-
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
Changes from 1 commit
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "Build and attach binary to release" | ||
on: | ||
release: | ||
types: ["created"] | ||
permissions: | ||
contents: write # to upload the binaries to the release | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: ["amd64", "arm64"] | ||
kegsay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
- run: mkdir build | ||
- run: go build ./cmd/syncv3 -o build/syncv3_linux_${{ matrix.arch }} | ||
env: | ||
GOARCH: ${{ matrix.arch }} | ||
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. Technically we should also have 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. I assumed that would be inherited from the fact that we're running on ubuntu, but I can make that explicit. |
||
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 | ||
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. 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. |
||
with: | ||
files: build/syncv3_linux_${{ matrix.arch }} | ||
fail_on_unmatched_files: 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.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
FTR the types are