axodotdev / cargo-dist

📦 shippable application packaging
https://axodotdev.github.io/cargo-dist/
Apache License 2.0
1.31k stars 56 forks source link

fleshed out "nightly builds" system #1143

Open Gankra opened 2 weeks ago

Gankra commented 2 weeks ago

A couple releases ago we shipped an undocumented feature called release-branch:

https://github.com/axodotdev/cargo-dist/blob/d97fc68880d963781aec462c72cd2c58cd3d142c/cargo-dist/src/config.rs#L245-L247

This feature is for a gitops-style "every push to this branch is a deploy". As part of this we force cargo-dist to select all publishable apps, take the maximum of their versions, and then append -alpha.{timestamp} to that version, and then pretend the all apps have that version:

https://github.com/axodotdev/cargo-dist/blob/d97fc68880d963781aec462c72cd2c58cd3d142c/cargo-dist/src/announce.rs#L511-L525

A lot of this is the machinery you might want for a "nightly release" but there are some potential differences/improvement:

Dekker1 commented 1 week ago

This was a feature that I was looking for! When trying it by setting release_branch in Cargo.toml it, however, seems to fully replace the mechanism of releasing based on tags when looking at the newly generated action. For my purpose I'm happy with the currently described mechanisms, but I would still want to also create "final" releases. Am I overlooking a way in which this is still possible, or would additional engineering be required to also allow the normal release mechanism?