This commit is contained in:
TJ Horner 2022-05-05 14:02:35 -04:00
parent 2153585ad3
commit 3bcc62ccc2
2 changed files with 9 additions and 1 deletions

View File

@ -20,11 +20,13 @@ jobs:
run: |
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o ./e6dl-windows-amd64.exe .
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o ./e6dl-darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o ./e6dl-darwin-arm64 .
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./e6dl-linux-amd64 .
GOOS=linux GOARCH=ppc64 go build -ldflags="-s -w" -o ./e6dl-linux-ppc64 .
- name: Compress binaries with upx
run: |
sudo apt-get install -y upx
upx e6dl-windows-amd64.exe e6dl-darwin-amd64 e6dl-linux-amd64
upx e6dl-windows-amd64.exe e6dl-darwin-amd64 e6dl-darwin-arm64 e6dl-linux-amd64 e6dl-linux-ppc64
- name: Upload binaries
uses: skx/github-action-publish-binaries@release-1.3
env:

View File

@ -14,10 +14,16 @@ dist-macos: ensure-dist-dir
# Build for macOS x64
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o dist/e6dl-darwin-amd64 main.go
# Build for macOS ARM
GOOS=darwin GOARCH=arm64 $(GOBUILD) -o dist/e6dl-darwin-arm64 main.go
dist-linux: ensure-dist-dir
# Build for Linux x64
GOOS=linux GOARCH=amd64 $(GOBUILD) -o dist/e6dl-linux-amd64 main.go
# Build for Linux PPC64
GOOS=linux GOARCH=ppc64 $(GOBUILD) -o dist/e6dl-linux-ppc64 main.go
dist: dist-win dist-macos dist-linux
build: