Skip to content

Commit

Permalink
fix: Build for common OS and architectures (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
atorrescogollo committed Jul 27, 2023
1 parent 52712df commit 5f80787
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ jobs:
- name: Run tests
run: go test -race -vet=off ./...
- name: Build cross platform binaries
env:
LINUX_OS_ARCH: 'linux/386 linux/amd64 linux/arm linux/arm64'
WINDOWS_OS_ARCH: 'windows/386 windows/amd64'
DARWIN_OS_ARCH: 'darwin/amd64 darwin/arm64'
run: |
go install github.com/mitchellh/gox@latest
# https://github.com/mitchellh/gox/issues/146#issuecomment-702096359
gox -osarch '!darwin/386' -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./...
gox \
-osarch "${LINUX_OS_ARCH} ${WINDOWS_OS_ARCH} ${DARWIN_OS_ARCH}" \
-output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./...
- name: Semantic Release
if: |
Expand Down

0 comments on commit 5f80787

Please sign in to comment.