Release macula-rust from the forge (refs #2) #3
Loading…
Reference in a new issue
No description provided.
Delete branch "hygiea/2-release-on-the-forge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #2 (forge-setup#30 rust port). Builder: Hygiea. Reviewer: Neptunus.
Tip
499bf683on master78d495c. Publish token referenced as secrets.CARGO_REGISTRY_TOKEN only; release-guard and dependency-advisories as local copies; plain-shell checkout; Go 1.27.4 read from tests/teststation/go.mod with a pinned sha256; publish job in macula-ci-otp by digest.Actions are off on this repo until this lands, so there are no runs yet. Full record on #2.
The Supervisor's ruling on publisher accounts: ONE account for all SDKs, sdk-publisher, a member of macula-sdk only with write:package only. - Both release workflows take FORGE_PACKAGES_USER=sdk-publisher and the FORGE_PACKAGES_TOKEN secret, and no CARGO_REGISTRY_TOKEN name remains. - The index is a git repository that answers no anonymous read, so git gets the account through a credential helper that reads those two variables: the token reaches neither ~/.cargo/credentials, nor the command line, nor the log. - The upload takes the same token through CARGO_REGISTRIES_MACULA_TOKEN, which is how cargo names the token of a registry that is not crates.io. - .cargo/config.toml records the probe: the index path relayed to us does not resolve with a valid member token ("Repository not found"), so that line is the one place to correct if Forgejo's own Cargo index path is the real one.The dispatcher probed the registry: Forgejo serves macula-sdk's Cargo index as a SPARSE index at /api/packages/macula-sdk/cargo/ and answers its config.json anonymously ("auth-required": false). The git index path relayed before does not exist. - .cargo/config.toml names that sparse index; the [net] git-fetch-with-cli line goes with the git fetch it was for. - The dry run carries no token and no credential helper: it now gets past the index and packages the crate. The upload keeps the token, as CARGO_REGISTRIES_MACULA_TOKEN (cargo's name for a registry that is not crates.io), and FORGE_PACKAGES_USER names the account it belongs to. Proved in the pinned CI image on host00, no token in the environment: `cargo publish --dry-run --registry macula` for this workspace printed "Compiling macula-rust v0.15.1", "Finished dev profile in 1m 23s", "Uploading macula-rust v0.15.1 (/src)" and "warning: aborting upload due to dry run". MSg`${ secrets.FORGE_PACKAGES_TOKEN }` (single braces) is not an expression: the runner passes it through literally, so cargo would send that text as the token. And cargo sends the configured token as the Authorization header verbatim, while the forge refuses a bare token (401) and takes `Bearer <token>`. Both files, the reviewer's fix at r=2.