taiki-e / upload-rust-binary-action

GitHub Action for building and uploading Rust binary to GitHub Releases.
Apache License 2.0
247 stars 22 forks source link

feat(bin-leading-dir): add 'bin-leading-dir' option #73

Closed linrongbin16 closed 7 months ago

linrongbin16 commented 7 months ago

Resolve #72 .

This PR add a new option: bin-leading-dir, which allow user customize where to put the bin (e.g. executable binary file(s)) in the archive.

I had explained the idea in https://github.com/taiki-e/upload-rust-binary-action/issues/72#issuecomment-2044396602, also see the README.md changes in this PR

TODO:


Update: I finished development, and the passed all tests in the CI.

But still, how to verify the built tar.gz and zip packages? to make sure they contains the directory structure as we are expecting?

I try to fork this repo and publish a fork action linrongbin16/upload-rust-binary-action@v1 (https://github.com/marketplace/actions/build-and-upload-rust-binary-to-github-releases-linrongbin16-testing). When using it in another repo, the CI reports v1 is not exist.

Screenshot_2024-04-09-22-17-52-809_com android chrome-edit

taiki-e commented 7 months ago

I try to fork this repo and publish a fork action linrongbin16/upload-rust-binary-action@v1 (https://github.com/marketplace/actions/build-and-upload-rust-binary-to-github-releases-linrongbin16-testing). When using it in another repo, the CI reports v1 is not exist.

Publish to the marketplace is unneeded. You can use your branch: linrongbin16/upload-rust-binary-action@feat-bin-dir

linrongbin16 commented 7 months ago

Publish to the marketplace is unneeded. You can use your branch: linrongbin16/upload-rust-binary-action@feat-bin-dir

I tested with this CI (randomly add some combinations on 'leading-dir' and 'bin-leading-dir'):

https://github.com/linrongbin16/cargo-ci-template.rs/blob/cba43840a90f09d6b10dfd0ab56ec7825903c740/.github/workflows/upload-rust-binary-build.yml#L19-L75

and the build assets are:

https://github.com/linrongbin16/cargo-ci-template.rs/releases/tag/v0.4.36

They all look good!

@taiki-e would you take a look?

taiki-e commented 7 months ago

Published in 1.20.0.