MarcoIeni / release-plz

Publish Rust crates from CI with a Release PR.
https://release-plz.ieni.dev
Apache License 2.0
792 stars 74 forks source link

Release request doesn't handle `CARGO_REGISTRIES_<name>_TOKEN` env variable properly #1506

Closed andreyLetenkovWefox closed 3 months ago

andreyLetenkovWefox commented 4 months ago

Bug description

According to the doc, tokens for custom registries may be specified with environment variables of the form CARGOREGISTRIES_TOKEN where is the name of the registry in all capital letters. But it appears that at the moment while handling the env variable the registry name is not being put in uppercase, meaning if the custom registry name is foo release-plz will try to fetch the corresponding token by CARGO_REGISTRIES_foo_TOKEN key, not CARGO_REGISTRIES_FOO_TOKEN

To Reproduce

Call release-plz release --registry foo against custom registry while having CARGO_REGISTRIES_FOO_TOKEN env variable set.

Expected behavior

Screenshots

Environment

Additional context