Skip to content

ci(cli): use CLI_RELEASE_PAT so release-please can create cli-v* tags#358

Merged
rongxin-liu merged 1 commit into
mainfrom
fix/cli-release-pat
Jul 21, 2026
Merged

ci(cli): use CLI_RELEASE_PAT so release-please can create cli-v* tags#358
rongxin-liu merged 1 commit into
mainfrom
fix/cli-release-pat

Conversation

@rongxin-liu

Copy link
Copy Markdown
Contributor

Summary

  • The cli Release Please workflow failed to cut the cli-v1.12.0 release (run #13, commit 31371f9) with:

    Cannot create ref due to creations being restricted / Published releases must have a valid tag

  • Root cause: the cli-release-tags repo ruleset restricts refs/tags/cli-v* creation to the Admin repository role. The workflow ran release-please with the default GITHUB_TOKEN (github-actions[bot]), which isn't an admin — and the GitHub Actions integration can't be added to the repo-level ruleset bypass (org policy rejects it).
  • Fix: run release-please with the existing CLI_RELEASE_PAT secret (an admin PAT), which satisfies the Admin-role bypass already on the ruleset. Also refreshes the stale token-model comment.

PR #342 (chore: release main) is currently merged but stuck at autorelease: pending; the manifest expects cli 1.12.0 while the latest tag is cli-v1.11.0.

Test plan

  • Merge this PR.
  • Confirm the cli Release Please run on main succeeds and creates the cli-v1.12.0 tag + GitHub Release.
  • Confirm cli-release.yaml fires on the new tag and publishes gh-teacher / gh-student.
  • Verify PR chore: release main #342's autorelease: pending label flips to tagged/published.

The cli-release-tags ruleset restricts cli-v* tag creation to the Admin
role, and github-actions[bot] can't be granted a repo-level bypass (org
policy). The default GITHUB_TOKEN therefore fails to publish the release
("Cannot create ref due to creations being restricted"). Switch to the
admin CLI_RELEASE_PAT, which satisfies the existing bypass.
@rongxin-liu
rongxin-liu merged commit 9e8f017 into main Jul 21, 2026
2 checks passed
@rongxin-liu
rongxin-liu deleted the fix/cli-release-pat branch July 21, 2026 21:50
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.

1 participant