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 <sgleske@integralads.com>
This commit is contained in:
Sam Gleske 2025-02-12 20:40:38 -05:00
parent a20894b1f2
commit 5f7539379a
2 changed files with 5 additions and 1 deletions

View File

@ -96,3 +96,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
files: | files: |
dist/databricks_cli_*.zip dist/databricks_cli_*.zip
dist/databricks_cli_*.tar.gz

View File

@ -41,7 +41,10 @@ builds:
binary: databricks binary: databricks
archives: 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. # 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 # Snapshot archives must have a stable file name such that the artifacts in the nightly