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

Run release and add output file to releases #73

Open
Stefanuk12 opened this issue Jul 11, 2023 · 5 comments
Open

Run release and add output file to releases #73

Stefanuk12 opened this issue Jul 11, 2023 · 5 comments
Labels
question Further information is requested

Comments

@Stefanuk12
Copy link

I'm trying to run the output Rust executable. The program would create a new file called test.zip when ran. How do I make it run the program and add the zip file to the GitHub release within the action?

I've tried to cd into /github/workspace/output and then run the executable. However, I get an error saying the command does not exist.

Any ideas?

@Douile
Copy link
Member

Douile commented Jul 11, 2023

If the action runs on the release it should add the artifacts to the release. Could you provide a link to the workflow for further context.

@Stefanuk12
Copy link
Author

@Douile
Copy link
Member

Douile commented Jul 12, 2023

So automatic releasing will only work when using the on: release action. You need a separate workflow that uploads build artifacts if you want artifacts for each commit. https://github.com/rust-build/rust-build.action#upload-output-as-an-artifact-or-use-with-other-steps

@Douile Douile added the question Further information is requested label Jul 12, 2023
@Stefanuk12
Copy link
Author

Sorry if my question is unclear. Essentially I want it to run the executable after it's compiled and include the output in the release.

I am doing this for each release, not commit.

@Douile
Copy link
Member

Douile commented Jul 12, 2023

Ah my bad, so you can either use the action similar to guide before: extract the archive in a step after rust-build then run it there.
Or in post build you should be able to access the binary in ./target/release/binary then make sure to add the output to extra files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants