rust-build icon indicating copy to clipboard operation
rust-build copied to clipboard

Centralize storage of release number from CI scripts

Open georgik opened this issue 3 years ago • 3 comments

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.

georgik avatar Jul 22 '22 11:07 georgik

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

SergioGasquez avatar Jul 22 '22 12:07 SergioGasquez

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.

SergioGasquez avatar Jul 22 '22 12:07 SergioGasquez

@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.

SergioGasquez avatar Jul 26 '22 18:07 SergioGasquez