Script breaks when archiving is disabled
I noticed that if I turn off archiving, the script crashes after compilation. I'd like to be able to upload the binaries directly, without them being archived.
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: ...
target: ${{ matrix.target }}
tar: none
zip: none
token: ${{ secrets.GITHUB_TOKEN }}
The workflow fails with the following error:
/Users/runner/work/_actions/taiki-e/upload-rust-binary-action/v1/main.sh: line 484: assets[@]: unbound variable
tar: none + zip: none doesn't mean upload binary as-is. It means that don't upload anything unless asset option is used (it's not a documented behavior though...).
Support for the builtin feature to upload binaries without archiving is being tracked in #6, and suggestions for APIs and implementations are welcome.
Workaround is using the asset option as described here.
Aside from that, the error message here is not nice and it needs to be fixed separately.
Thanks!
I'm guessing there's no way to rename the asset, right? Your suggestion worked, but it would be nice to be able to add the target triple to the binary name. Also, there could be a way to remove the exe extension when building for a non-Windows target.