Release Please keeps a version bump PR current from Conventional Commits. Merge that PR to publish.
flowchart LR
commit["Conventional commits land"] --> pr["Release Please updates version PR"]
pr -->|merge| tag["Create tag and GitHub release"]
tag --> release["Test, build, attest, and upload assets"]
release --> bcr["Open the Bazel Central Registry PR"]
Two repository secrets are required:
GH_RELEASE_TOKEN: Classic PAT withrepoandworkflowscopes. Release Please uses it so tag pushes triggerrelease.yaml.BCR_PUBLISH_TOKEN: Classic PAT withrepoandworkflowscopes. Its account must be able to push toformatjs/bazel-central-registryand open the upstream PR.
Set secrets interactively so tokens do not enter shell history:
gh secret set GH_RELEASE_TOKEN --repo formatjs/rules_formatjs
gh secret set BCR_PUBLISH_TOKEN --repo formatjs/rules_formatjsBefore merging the Release Please PR, confirm main CI and Verify Hooks are
green, no release run is active, and the proposed version is expected. A fix
normally produces a patch, a feat produces a minor, and a breaking change
produces a major.
gh run list --repo formatjs/rules_formatjs --workflow ci.yaml --branch main --limit 1
gh run list --repo formatjs/rules_formatjs --workflow verify-hooks.yml --branch main --limit 1
gh run list --repo formatjs/rules_formatjs --workflow release-please.yml --limit 5
gh release list --repo formatjs/rules_formatjs --limit 5Merge the Release Please PR. That merge is explicit approval of its version,
including a major bump. Release Please creates the tag and GitHub release. The
tag triggers release.yaml, which builds assets, creates attestations, updates
the release, and opens the BCR PR.
gh run list --repo formatjs/rules_formatjs --workflow release.yaml --limit 1
gh run watch RUN_ID --repo formatjs/rules_formatjs --exit-status
gh release view TAG --repo formatjs/rules_formatjsCompletion means the tag points at the Release Please merge, the GitHub release contains source and docs archives, attestations exist, and the BCR PR is open.
- If the Release Please PR is missing or stale, dispatch
release-please.ymlonmain. - If the tag exists but assets or attestations are missing, dispatch
release.yamlwith that tag. - If the GitHub release exists but BCR publication failed, dispatch
publish.yamlwith that tag. - If the BCR push rejects its token, rotate
BCR_PUBLISH_TOKEN, then retrypublish.yaml. Do not rerun Release Please or create another tag.
gh workflow run release-please.yml --repo formatjs/rules_formatjs --ref main
gh workflow run release.yaml \
--repo formatjs/rules_formatjs \
--ref main \
-f tag_name=TAG
gh workflow run publish.yaml \
--repo formatjs/rules_formatjs \
--ref main \
-f tag_name=TAGDo not invent a version or push a tag. Keep MODULE.bazel version blank;
Release Please updates version.txt, while the BCR publisher sets the module
version in its registry PR.