rust-build
rust-build copied to clipboard
Centralize storage of release number from CI scripts
Problem: Rust toolchain version number is stored in 23 files. Each release requires an update of all these files.
Find a way to reduce repeated magic numbers in CI scripts.
On top of my head, the only option that comes to mind is using Actions Secrets, but it won't show the value if any user would like to know the toolchain version, so I don't really see it as a good option
Possible workaround: https://arinco.com.au/blog/github-actions-share-environment-variables-across-workflows/. It may also be worth mentioning that for every release we also need to update:
One approach could be to generate latest tags. Eg: esp32_v4.4_latest,esp32c3_latest ... The big problem with this approach is that it can unstabilize those repositories.
@jessebraham suggested using:
curl --silent https://api.github.com/repos/esp-rs/rust-build/releases | jq -r 'map(select(.prerelease | not)) | first | .tag_name'
Which gets you the latest release name which is NOT a pre-release, the jq query can be updated as needed.