Merge pull request #339 from matrix-org/dmr/build-binary-for-releases

This commit is contained in:
David Robertson 2023-10-11 14:41:09 +01:00 committed by GitHub
commit 20c361ffc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
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:
os: ["linux"]
arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- run: mkdir build
- run: go build -o build/syncv3_linux_${{ matrix.arch }} ./cmd/syncv3
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
files: build/syncv3_linux_${{ matrix.arch }}
fail_on_unmatched_files: true