Skip to content

Conversation

@kormide
Copy link
Contributor

@kormide kormide commented Dec 13, 2025

Migrate rules_rust off of the deprecated Publish to BCR GitHub app to the newer reusable workflow. The reusable workflow has a number of benefits over the app:

  • It supports build attestations which can be enabled at a later time.
  • Gives finer grain control over running the publish process—if it fails, you can manually re-run the workflow.
  • It's more secure—you control the PAT rather than giving the app write permissions.

Some actions that maintainer for this ruleset will need to take:

  • Add a classic PAT named BCR_PUBLISH_TOKEN for the repository or org (see steps). I recommend creating a "machine" user for bazelbuild and generating a classic PAT for that user rather than using an individual's PAT. For example, in bazel-contrib we use the bazel-contrib-bot user to do publishes.
  • Uninstall the GitHub app for this repo.
  • Test a publish after landing, or wait for the next release. I'll be available to help debug any issues that come up if the workflow fails.

Comment on lines -1 to -3
fixedReleaser:
login: scentini
email: 11149636+scentini@users.noreply.github.com
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fixed releaser is no longer required with the workflow because the identity of the publish token is now the actor who opens the PR on the BCR.

@kormide kormide marked this pull request as ready for review December 13, 2025 00:28
@kormide
Copy link
Contributor Author

kormide commented Dec 13, 2025

@UebelAndre @illicitonion

@kormide kormide force-pushed the publish-to-bcr-workflow branch 2 times, most recently from cc77baf to bf77d17 Compare December 13, 2025 01:33
@kormide kormide force-pushed the publish-to-bcr-workflow branch from bf77d17 to 72bb93c Compare December 13, 2025 07:05
@UebelAndre
Copy link
Collaborator

@krasimirgg @scentini as Googlers, can you provide the access token?

@kormide
Copy link
Contributor Author

kormide commented Jan 7, 2026

Updated the instructions in the PR description to recommend creating a machine user for bazelbuild and using that user to generate a classic PAT. We do this for bazel-contrib and aspect-build and have associated bot users like https://github.com/bazel-contrib-bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants