Skip to content

ci: drop v prefix on release tags (org ruleset blocks v*)#38

Merged
jklaassenjc merged 1 commit into
mainfrom
juergen/release-tag-no-v-prefix
May 26, 2026
Merged

ci: drop v prefix on release tags (org ruleset blocks v*)#38
jklaassenjc merged 1 commit into
mainfrom
juergen/release-tag-no-v-prefix

Conversation

@jklaassenjc
Copy link
Copy Markdown
Collaborator

@jklaassenjc jklaassenjc commented May 26, 2026

Summary

PR #37 got the workflow all the way to gh release create — tests passed, all 5 binaries built — but gh release create failed with:

HTTP 422: Validation Failed
pre_receive Repository rule violations found

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

The TheJumpCloud org has a ruleset "Version Tag Protections" (target=tag) with rules forbidding creation / update / deletion / non_fast_forward on refs matching refs/tags/v* (and refs/tags/proto/v*). GITHUB_TOKEN can't bypass it (current_user_can_bypass: "never" for actions).

Our workflow was minting tags like v1.17.0 — directly inside the forbidden pattern. Meanwhile the existing release tags (1.15.0, 1.16.0) use the no-prefix convention, which the rule explicitly allows.

Fix

One-line change in .github/workflows/release.yml:

// Before
const tag = `v${next}`;
// After
const tag = String(next);

Plus a comment so the next person to touch this knows why there's no v.

What ships after this merges

Labeled minor, so the (now-working) release workflow produces 1.17.0 (matching the 1.16.0 / 1.15.0 pattern) with auto-generated notes covering every PR since 1.16.0.

Follow-up housekeeping

There's a stray minor tag in the repo from an earlier botched workflow run (points at e3ad6090). Doesn't affect the version compute (semver.valid("minor") === false), but worth deleting. Out of scope for this PR.

Test plan

  • Verified the org ruleset (gh api repos/.../rulesets/1555769) blocks v* tag creation
  • Verified existing tags (1.15.0, 1.16.0) don't carry the v prefix
  • On merge, release workflow successfully publishes 1.17.0

🤖 Generated with Claude Code


Note

Low Risk
Single workflow change to tag naming; no application runtime or security logic affected.

Overview
Fixes failed gh release create runs by emitting release tags without a v prefix (e.g. 1.17.0 instead of v1.17.0), matching existing tags and avoiding the org Version Tag Protections ruleset that blocks refs/tags/v*.

In Compute-Version, tag is now String(next) rather than `v${next}`, with a short comment explaining the ruleset constraint. The log line for the latest tag no longer adds a v prefix.

Reviewed by Cursor Bugbot for commit 112be90. Bugbot is set up for automated code reviews on this repo. Configure here.

PR #37's release attempt got all the way to `gh release create` but
failed with:
  Cannot create ref due to creations being restricted.
  Published releases must have a valid tag.

Root cause: the TheJumpCloud org has a ruleset "Version Tag
Protections" (target=tag) that forbids creating refs matching
refs/tags/v* (and refs/tags/proto/v*). GITHUB_TOKEN cannot bypass it.

The workflow was minting tags like v1.17.0 while the existing release
tags (1.15.0, 1.16.0) use the no-prefix convention. Strip the v so
the next release lands as 1.17.0 instead of v1.17.0. Matches the org
rule and stays consistent with the historical tag scheme.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jklaassenjc jklaassenjc merged commit 101517d into main May 26, 2026
7 of 8 checks passed
@jklaassenjc jklaassenjc deleted the juergen/release-tag-no-v-prefix branch May 26, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants