jrmoulton / tmux-sessionizer

Tmux Sessionizer: A tool for opening git repositories as tmux sessions
MIT License
463 stars 35 forks source link

Add Automated Binary Releases with GitHub Actions #57

Closed stefhol closed 9 months ago

stefhol commented 10 months ago

Hi,

I've been trying to use tms in a docker container but I failed because I could not install the whole rust toolchain. So I started looking how to get some prebuild binaries and found other repositories using git2 buckle. I noticed the beautiful release page and realized that this is very easy to achieve.

I've set up an automated release process using GitHub Actions. This was auto generated by cargo-dist

Implementation:

Outcome: This implementation results in a structured release page My tmux-sessionizer release page. Note: Some links might be broken as they reference the original repository instead of the fork. These have been manually adjusted to point to my repository for demonstration.

My Changes can be reduced to the Cargo.toml. The provided cargo dist config in there is generating the workflow file. And I needed to have the openssl vendored or my musl build on the github server would fail

Cheers

jrmoulton commented 10 months ago

Thanks!!! I've really been wanting to add binary releases.

I'm going to take a few days to look into cargo-dist and a little more into GitHub Actions but this looks great!

jrmoulton commented 10 months ago

I'm new to GitHub Actions. Is the process for creating a release still the same and then on creating a release the action will run and tag the binaries to the release page?

stefhol commented 10 months ago

Yeah it's automatic the only important thing is that the git tag and the cargo.toml release has to the same version. If not the pipeline fails

I used cargo-release because I forget always something. But its really just git push git tag v1.1.1 git push origin v1.1.1 The pipeline is running at this point and if it is finished a release is created with the assets. If it fails then there is no release.

cargo-dist is only needed if you want to update the workflow config or create it

jrmoulton commented 9 months ago

This looks good to me and I think I'm good to merge it.

@petersimonsson any thoughts?

petersimonsson commented 9 months ago

@jrmoulton looks reasonable to me

jrmoulton commented 9 months ago

Thanks! @stefhol