From 5f7539379ac6517662d9bd0997a807c9a43416a1 Mon Sep 17 00:00:00 2001 From: Sam Gleske Date: Wed, 12 Feb 2025 20:40:38 -0500 Subject: [PATCH] Use tar.gz for Mac and Linux Changes ------- Changes GitHub releases to handle Mac and Linux binaries slightly differently than Windows. | Operating System | Archive Format | | ---------------- | -------------- | | Mac OS | `tar.gz` | | Linux | `tar.gz` | | Windows | `zip` | Tests ----- I tested with the following commands. ```bash $ goreleaser release --snapshot $ ls -1 dist/*.{zip,tar.gz} dist/databricks_cli_darwin_amd64.tar.gz dist/databricks_cli_darwin_arm64.tar.gz dist/databricks_cli_linux_amd64.tar.gz dist/databricks_cli_linux_arm64.tar.gz dist/databricks_cli_windows_amd64.zip dist/databricks_cli_windows_arm64.zip ``` Related issues -------------- Closes #1296 Co-authored-by: Sam Gleske --- .github/workflows/release-snapshot.yml | 1 + .goreleaser.yaml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index 8b4684eab..9fbbb1519 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -96,3 +96,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} files: | dist/databricks_cli_*.zip + dist/databricks_cli_*.tar.gz diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 76395c9a2..09a457001 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -41,7 +41,10 @@ builds: binary: databricks archives: -- format: zip +- format: tar.gz + format_overrides: + - goos: windows + format: zip # Include version in archive only for release builds and not for snapshot builds. # Snapshot archives must have a stable file name such that the artifacts in the nightly