Repository: atuinsh/atuin (language: rust)

Issue:
The file format of the prebuilt binary is wrong
The file format of [atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip](https://github.com/atuinsh/atuin/releases/download/v17.2.1/atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip) is wrong.
The file extension `tar.gz.zip` is wrong.

https://github.com/atuinsh/atuin/releases/tag/v17.2.1

<img width="555" alt="image" src="https://github.com/atuinsh/atuin/assets/13323303/6ba63c96-66c3-4753-ae8a-8814cd82b5ba">



Discussion / hints:
I couldn't find related changes between v17.2.0 and v17.2.1.

https://github.com/atuinsh/atuin/compare/v17.2.0...v17.2.1
```console
$ zipinfo atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip 
Archive:  atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip
Zip file size: 7810245 bytes, number of entries: 1
-rw-r--r--  4.5 unx  7862880 bl defN 24-Jan-03 15:57 atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz
1 file, 7862880 bytes uncompressed, 7810039 bytes compressed:  0.7%

$ unzip atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip
Archive:  atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip
  inflating: atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz

$ tar tvzf atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz
-rw-r--r--  0 runner docker   1071  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/LICENSE
-rw-r--r--  0 runner docker   9359  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/README.md
-rwxr-xr-x  0 runner docker 19602816  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/atuin
drwxr-xr-x  0 runner docker        0  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/completions/
-rw-r--r--  0 runner docker    60269  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/completions/atuin.fish
-rw-r--r--  0 runner docker    45130  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/completions/_atuin
-rw-r--r--  0 runner docker    71719  1  4 00:57 atuin-v17.2.1-x86_64-unknown-linux-musl/completions/atuin.bash
```
The release workflow failed before releasing the prebuilt binary to GitHub Releases.
The step `Publish archives and packages` wasn't run.
So I'm not sure how this prebuilt binary was released.

https://github.com/atuinsh/atuin/actions/runs/7399428878/job/20130823871#step:14:20
 > Artifact atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz.zip successfully finalized. Artifact ID 1145595207
> Artifact atuin-v17.2.1-x86_64-unknown-linux-musl.tar.gz has been successfully uploaded! Final size is 7810206 bytes. Artifact ID is 1145595207

The file was uploaded but following release step was not run. Given the release already existed I assume this just means the file wasn't replaced properly
Anyway, https://github.com/atuinsh/atuin/blob/4233b6e6b705d3c88079b250c154c8b97677a989/.github/workflows/release.yaml#L190 this line is at fault, we need to include the libc name in this case
According to cargo-deb, we can also specify the target:

<https://github.com/kornelski/cargo-deb#cross-compilation>
> cargo deb --target=i686-unknown-linux-gnu
I've updated the release manually + confirmed the new artifact is OK

>  this line is at fault, we need to include the libc name in this case

For sure, though we will probably only want to do so for musl. Otherwise I am quite sure we will break a whole bunch of people's automations. For now, we can disable musl deb building - it wasn't working anyway

Fix patch:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 89eadeb9a13..d1e12483042 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -178,7 +178,7 @@ jobs:
     - name: Create Debian package
       id: debian-package
       shell: bash
-      if: startsWith(matrix.job.os, 'ubuntu')
+      if: startsWith(matrix.job.os, 'ubuntu') && endsWith(matrix.job.target, 'gnu')
       run: |
         cargo install cargo-deb
         cargo deb --deb-revision="" -p atuin


Test patch: