Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script breaks when archiving is disabled #83

Open
br0kenpixel opened this issue Sep 3, 2024 · 2 comments
Open

Script breaks when archiving is disabled #83

br0kenpixel opened this issue Sep 3, 2024 · 2 comments

Comments

@br0kenpixel
Copy link

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
@taiki-e
Copy link
Owner

taiki-e commented Sep 3, 2024

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.

@br0kenpixel
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants