diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fcf859b..e5e927b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,13 +19,20 @@ jobs: - name: Build Binary for Linux run: | - make build - zip "lda-linux-amd64.zip" "lda" + make build GOARCH=amd64 + tar -czvf "lda-linux-amd64.tar.gz" "lda" + make build GOARCH=arm64 + tar -czvf "lda-linux-arm64.tar.gz" "lda" - uses: actions/upload-artifact@v4 with: - name: lda-linux-amd64.zip - path: lda-linux-amd64.zip + name: lda-linux-amd64.tar.gz + path: lda-linux-amd64.tar.gz + + - uses: actions/upload-artifact@v4 + with: + name: lda-linux-arm64.tar.gz + path: lda-linux-arm64.tar.gz build-macos: runs-on: macos-latest @@ -38,15 +45,22 @@ jobs: with: go-version: '1.21.4' - - name: Build Binary for macOS Intel + - name: Build Binary for macOS run: | - make build - zip "lda-darwin-arm64.zip" "lda" + make build GOARCH=amd64 + tar -czvf "lda-darwin-amd64.tar.gz" "lda" + make build GOARCH=arm64 + tar -czvf "lda-darwin-arm64.tar.gz" "lda" + + - uses: actions/upload-artifact@v4 + with: + name: lda-darwin-amd64.tar.gz + path: lda-darwin-amd64.tar.gz - uses: actions/upload-artifact@v4 with: - name: lda-darwin-arm64.zip - path: lda-darwin-arm64.zip + name: lda-darwin-arm64.tar.gz + path: lda-darwin-arm64.tar.gz create-release: needs: [build-linux, build-macos] @@ -63,7 +77,9 @@ jobs: uses: softprops/action-gh-release@v2 with: files: | - artifacts/lda-darwin-arm64.zip/lda-darwin-arm64.zip - artifacts/lda-linux-amd64.zip/lda-linux-amd64.zip + artifacts/lda-darwin-arm64.tar.gz/lda-darwin-arm64.tar.gz + artifacts/lda-darwin-amd64.tar.gz/lda-darwin-amd64.tar.gz + artifacts/lda-linux-amd64.tar.gz/lda-linux-amd64.tar.gz + artifacts/lda-linux-arm64.tar.gz/lda-linux-arm64.tar.gz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 7d92b72..9e21ac5 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ all: build debug ## Build binary build: proto - CGO_ENABLED=1 GOOS=$(UNAME) go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" . + CGO_ENABLED=1 GOOS=$(UNAME) GOARCH=$(ARCH) go build -a -tags netgo -ldflags="$(LDFLAGS)" -o "$(TARGET)" . ## Install binary to GOPATH install: proto