free-claude-code/scripts
Ali Khokhar 9c4d81a3f0
patch: Automate release versions and GitHub Releases (#1903)
## Why

Manual version bumps create conflicts between PRs and require
contributors to update package metadata before the final release version
is known. Release intent should be declared in the PR title and applied
once after merge.

## How

Require exactly `patch: `, `minor: `, or `major: ` for changes to
assets, scripts, source, Python version, pyproject.toml, or uv.lock.
Forbid release prefixes when none of those paths change. Keep the
required Version policy check and rerun it independently on title edits.

Use hatch-vcs and Git release tags instead of maintained version
numbers. Installed FCC keeps reading its distribution metadata.
Git-aware uv cache keys refresh local development installs without
changing the lockfile.

Post-merge reads the saved squash title, reserves one version at that
commit, stages validated distributions on a draft GitHub Release,
publishes the same files to PyPI, then publishes the Release with
generated notes. Retries reuse the version and staged bytes. Later
releases stop until an unfinished predecessor completes. Recovery
dispatch can retry an earlier main commit using the repaired workflow.

Update the issue-version bot to compare against the latest published
Release and document contributor title rules. Establish the existing,
successfully published 6.2.66 version as the initial release tag.

The accepted contract retains the existing release paths, ordered queue,
trusted PyPI publisher, and ordinary pull-request check trust model.
There are no manual version bumps or release-only commits.






<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=69606710"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a>Confidence Score: 4/5</h2>

<!-- greptile-risk -->

Not safe to merge until the outstanding release-finalization issue is
fixed.

<h2><a
href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22alishahryar1%2Ffree-claude-code%22%20on%20the%20existing%20branch%20%22ali%2Fautomatic-release-versions%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22ali%2Fautomatic-release-versions%22.%0A%0A%23%23%23%20Issue%201%0A.github%2Factions%2Fci-environment%2Faction.yml%3Aundefined-52%0AIf%20a%20fork%20PR%20has%20a%20version%20tag%20pointing%20to%20a%20different%20commit%20than%20the%20base%20repository%E2%80%99s%20tag%2C%20this%20unforced%20fetch%20rejects%20the%20canonical%20tag.%20The%20Version%20policy%20job%20checks%20out%20the%20fork%20with%20full%20history%2C%20so%20setup%20fails%20before%20the%20required%20check%20runs.%20Fetch%20canonical%20tags%20without%20colliding%20with%20fork%20tags.%0A%0A%23%23%23%20Issue%202%0Ascripts%2Fpublish_release.py%3Aundefined-145%0AAfter%20publishing%20the%20distributions%20to%20PyPI%2C%20this%20passes%20%60--verify-tag%60%20to%20%60gh%20release%20edit%60%2C%20which%20rejects%20that%20flag.%20The%20GitHub%20Release%20remains%20a%20draft%2C%20retries%20fail%20at%20the%20same%20step%2C%20and%20the%20next%20release%20cannot%20proceed%20while%20its%20predecessor%20is%20unfinished.%20Remove%20the%20flag%20from%20the%20edit%20command.%0A%0A%60%60%60suggestion%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self.gh%28%22edit%22%2C%20tag%2C%20%22--draft%3Dfalse%22%2C%20%22--latest%22%29%0A%60%60%60%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=alishahryar1%2Ffree-claude-code&pr=1903&platform=github"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=7"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7"><img
alt="Fix All in Codex"
src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7"
align="right"></picture></a>Findings</h2>

1. <img alt="P1"
src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9"
align="top">&nbsp;**Conflicting fork tags fail CI** <a
href="https://github.com/Alishahryar1/free-claude-code/pull/1903#discussion_r4108544662">▶</a>
2. <img alt="P1"
src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9"
align="top">&nbsp;**Release finalization always fails** <a
href="https://github.com/Alishahryar1/free-claude-code/pull/1903#discussion_r4108544663">▶</a>

<details open><summary>Summary</summary>

The PR automates release versioning and publication. The fork-tag CI
conflict is fixed, but release finalization remains broken.
</details>

<!-- greptile_confidence_score:4 -->

<sub>Reviews (3) · Last reviewed commit: ["Use canonical release tags in
disposable..."](fc416b2667)</sub>

<!-- /greptile_comment -->
2026-09-25 14:21:55 -07:00
..
update Make fcc-update run the existing installer (#1857) 2026-09-21 22:44:09 -07:00
check_version_policy.py patch: Automate release versions and GitHub Releases (#1903) 2026-09-25 14:21:55 -07:00
ci.ps1 Parallelize browser CI and fix chat scroll reset after Stop (#1687) 2026-09-06 00:40:54 -07:00
ci.sh Parallelize browser CI and fix chat scroll reset after Stop (#1687) 2026-09-06 00:40:54 -07:00
install-muse.ps1 Fix Windows Muse installation with empty PATH entries (#1729) 2026-09-08 22:50:06 -07:00
install.ps1 Publish FCC releases to PyPI and enforce version policy (#1896) 2026-09-25 02:27:31 -07:00
install.sh Publish FCC releases to PyPI and enforce version policy (#1896) 2026-09-25 02:27:31 -07:00
publish_release.py patch: Automate release versions and GitHub Releases (#1903) 2026-09-25 14:21:55 -07:00
uninstall-muse.ps1 Fix Windows Muse installation with empty PATH entries (#1729) 2026-09-08 22:50:06 -07:00
uninstall.ps1 Make fcc-update run the existing installer (#1857) 2026-09-21 22:44:09 -07:00
uninstall.sh Make fcc-update run the existing installer (#1857) 2026-09-21 22:44:09 -07:00
validate_release.py patch: Automate release versions and GitHub Releases (#1903) 2026-09-25 14:21:55 -07:00