Repository navigation
Conversation
CARGO_REGISTRY_TOKEN moves to a crates-io environment (v* tags and main only, a main-maintainer approves each publish) and NIGHTLY_APP_PRIVATE_KEY to a nightly environment (main only). As repository secrets, any workflow pushed to any branch could read them; workflow_dispatch of release.yml with publish_crates from a branch also ran that branch's publish script with the token.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both secrets are repository-level today, so any workflow on any branch can read them. Also,
workflow_dispatchofrelease.ymlwithpublish_cratesfrom a branch runs that branch'sscripts/publish-crates.shwith the crates.io token.This moves each secret's job into an environment:
cratesjob →crates-io: deployable fromv*tags andmainonly, and amain-maintainersapproval is needed before each publish.record-llamacpp/record-mlx→nightly: deployable frommainonly. No reviewers, so the schedule still runs unattended. Dispatching frommainstill tests the newest rc branch, as before.Do this before merging
Both environments are already set up:
crates-iorequires amain-maintainersapproval and only runs fromv*tags ormain;nightlyonly runs frommain. What's left is the secrets:gh secret set CARGO_REGISTRY_TOKEN --env crates-io -R basecompute/superfluidgh secret set NIGHTLY_APP_PRIVATE_KEY --env nightly -R basecompute/superfluid < key.pemgh secret delete CARGO_REGISTRY_TOKEN -R basecompute/superfluidandgh secret delete NIGHTLY_APP_PRIVATE_KEY -R basecompute/superfluidFollow-up worth doing: switch crates.io to trusted publishing (OIDC via
rust-lang/crates-io-auth-action) so there's no long-lived token at all. Each crate has to be configured on crates.io first, and a crate's first publish still needs a token.