Repository: lsd-rs/lsd (language: rust)

Issue:
CI/CD: PowerShell completion script is built but not released
In `autocomplete/` of `lsd-v1.0.0-x86_64-pc-windows-*.zip` from https://github.com/lsd-rs/lsd/releases/tag/v1.0.0, there are only `lsd.bash-completion`, `lsd.fish`, and `_lsd`, but not `_lsd.ps1`.

We are building `_lsd.ps1`, but the workflow never releases it!

https://github.com/lsd-rs/lsd/blob/6f8e09524835cf15f5d5a9a7a1701e71dbe78f01/build.rs#L32-L36

https://github.com/lsd-rs/lsd/blob/6f8e09524835cf15f5d5a9a7a1701e71dbe78f01/.github/workflows/CICD.yml#L228-L231

I notice that `_lsd.ps1` is built but not released from the beginning ([commit `98bc907`: Add a complete CD](https://github.com/lsd-rs/lsd/commit/98bc907101685e10a9fb0169b8249c66b068c242))…
Is it on purpose? ~~If not, I can make a PR.~~ I've submitted #953. If that's intentional, please close it.

## Possible fix

Add the following line to `CICD.yml`.

```
         cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}-'*/'out/_${{ env.PROJECT_NAME }}.ps1' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/autocomplete/' 
```

The filename `_lsd.ps1` is [hard coded in clap](https://docs.rs/clap_complete/4.4.4/src/clap_complete/shells/powershell.rs.html#13-16), and I've verified it locally.

```rust
impl Generator for PowerShell {
    fn file_name(&self, name: &str) -> String {
        format!("_{name}.ps1")
    }
}
```

```shell
$ lsd ./target/debug/build/lsd-4e8da84150b024f4/out
_lsd  _lsd.ps1  lsd.bash  lsd.fish
```

(Besides, ripgrep releases `_lsd.ps1` in a similar way)

https://github.com/BurntSushi/ripgrep/blob/7099e174acbcbd940f57e4ab4913fee4040c826e/.github/workflows/release.yml#L150-L151

```
        cp "$outdir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
        cp complete/_rg "$staging/complete/"
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml
index ccdefc27e..dbf50bbc2 100644
--- a/.github/workflows/CICD.yml
+++ b/.github/workflows/CICD.yml
@@ -228,6 +228,7 @@ jobs:
         # autocomplete
         cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}-'*/'out/${{ env.PROJECT_NAME }}.bash' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/autocomplete/${{ env.PROJECT_NAME }}.bash-completion'
         cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}-'*/'out/${{ env.PROJECT_NAME }}.fish' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/autocomplete/'
+        cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}-'*/'out/_${{ env.PROJECT_NAME }}.ps1' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/autocomplete/'
         cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}-'*/'out/_${{ env.PROJECT_NAME }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/autocomplete/'
         # base compressed package
         pushd '${{ steps.vars.outputs.STAGING }}/' >/dev/null


Test patch: