Skip to content

CI: add a v14 stable publish track, guard both against publishing the wrong version line - #49

Merged
camrun91 merged 4 commits into
mainfrom
ci/dual-publish
Jul 31, 2026
Merged

CI: add a v14 stable publish track, guard both against publishing the wrong version line#49
camrun91 merged 4 commits into
mainfrom
ci/dual-publish

Conversation

@gharezlak

@gharezlak gharezlak commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Context

We want two live version lines on the same Foundry package listing: legacy v13 (`main`, 1.x) and v14 (2.x). Foundry's package page already supports one listing with multiple versions, each with its own compatibility range — confirmed by checking the actual live listing (foundryvtt.com/packages/archivist-sync), so this needs no registry restructuring, just a second stable-publish path feeding the same module id.

This also closes a real gap found while tracing the mechanics of the v14-breaks-v13 incident this project is recovering from: `v1.3.13` and `v2.0.0-beta.28` were tagged on the identical commit in this repo's history, and `auto-release.yml` fires a real Foundry publish on any push to `main` that bumps `module.json` — no check that the version being published is actually in the right family. That's precisely the shape of mistake that would let a v14-configured commit publish under a v13-looking tag (or vice versa).

What's here

  • New auto-release-v14.yml: mirrors auto-release.yml but triggers on push to a new release/v14 branch (doesn't exist yet — this workflow is inert until it's created), publishes to the same FOUNDRY_ADMIN_MODULE_ID as a separate version entry, requires module.json version 2.x / compatibility.minimum 14.x.
  • Version-family guards on both workflows: auto-release.yml now refuses to run unless version is 1.x and compatibility.minimum is 13.x; the new v14 workflow mirrors that for 2.x/14.x. Either one fails loudly and exits before touching the release/publish steps if the version doesn't match its branch's expected family.
  • Fixed a related latent bug: both workflows' own module.json manifest/download fields used to point at GitHub's built-in releases/latest, which is repo-wide — once a second stable track also publishes non-prerelease releases to this repo, whichever published most recently would silently take over the other track's "latest" URL, pointing a v13 user's stored manifest at v14's module.json or vice versa. Each track now owns its own moving tag (`v13-latest` / `v14-latest`), mirroring how `beta-release.yml` already does this for `beta-latest`.
  • Updated `.github/RELEASE_WORKFLOW.md` for the new dual-track model.

What this does NOT do

Doesn't create `release/v14` or push anything that would actually fire a publish — that's a deliberate next step once #47/#48 are reviewed and merged, not part of this PR. Nothing here changes current main publish behavior beyond the added guard (which only blocks a publish that was already wrong).

🤖 Generated with Claude Code

Greptile Summary

This PR establishes a dual stable-publish track by adding auto-release-v14.yml (triggering on release/v14) alongside the updated auto-release.yml (on main), both publishing to the same Foundry package listing under separate compatibility ranges. It also closes a real latent bug: both workflows now rewrite the module.json manifest to their own moving tag (v13-latest / v14-latest) instead of the repo-wide releases/latest URL, preventing one track's publish from silently hijacking the other track's update pointer.

  • New auto-release-v14.yml: mirrors the v13 workflow with correct concurrency serialization, pre-release version guard (rejects *-* strings), make_latest: false on all releases to preserve the v13 Latest badge, and a v14-latest moving tag.
  • auto-release.yml updates: adds a symmetric version-family guard (rejects non-1.x versions and non-13.x compat), upgrades to softprops/action-gh-release@v2, introduces a v13-latest moving tag, and moves inline ${{ }} expressions into env: blocks.
  • Documentation: RELEASE_WORKFLOW.md is updated with a dual-track branch diagram, a one-time pre-v14 cutover checklist, and updated manifest/download URL examples.

Confidence Score: 5/5

Safe to merge — the new workflow is inert until release/v14 is created, and the only behavioral change to the currently-active main path is the added version guard and the v13-latest moving tag, both of which fail loudly rather than silently.

The core risk this PR guards against (wrong-track publish) is addressed with explicit, noisy early exits. The new auto-release-v14.yml cannot fire until a release/v14 branch is pushed. The moving-tag pattern mirrors the already-proven beta-latest approach. The only findings are edge-case false-positive guards on bare-integer Foundry compat values, which produce loud CI failures rather than silent bad publishes.

Files Needing Attention: No files require special attention — the two suggestions on the COMPAT_MIN glob are low-priority and both workflows are otherwise structurally sound.

Important Files Changed

Filename Overview
.github/workflows/auto-release-v14.yml New v14 stable publish workflow — correctly mirrors auto-release.yml with the right concurrency group, pre-release guard, make_latest: false, and v14-latest moving tag; minor: COMPAT_MIN glob rejects valid bare-integer Foundry compat values.
.github/workflows/auto-release.yml Added version-family guard, pre-release check, v13-latest moving-tag logic, and concurrency group; upgraded action to @v2; make_latest set correctly on both releases; COMPAT_MIN glob has the same bare-integer edge case as the v14 workflow.
.github/RELEASE_WORKFLOW.md Documentation updated to reflect dual-track model with accurate branch strategy, v13-latest/v14-latest moving-tag explanation, pre-v14 cutover checklist, and warnings about release/v14 bootstrap ordering.

Reviews (2): Last reviewed commit: "fix: harden stable release guards and La..." | Re-trigger Greptile

Foundry's package page already supports one listing with multiple
versions, each carrying its own compatibility range, so publishing v14
alongside v13 needs no registry restructuring — just a second publish
path feeding the same module id.

- New auto-release-v14.yml: mirrors auto-release.yml but triggers on
  push to release/v14, requires module.json version 2.x / compat 14.x,
  and publishes to the same FOUNDRY_ADMIN_MODULE_ID as a separate
  version entry.
- Both stable workflows now refuse to run if module.json's version/
  compatibility don't match their expected family (1.x/13.x for main,
  2.x/14.x for release/v14). This directly targets the mechanism found
  in git history behind the original incident: auto-release.yml fires
  on any push to main that bumps module.json, and a v14-shaped commit
  once landed there under a v13 version string.
- Fixed a related bug: module.json's own manifest/download URLs used
  GitHub's "releases/latest", which is repo-wide — with two stable
  tracks publishing non-prerelease releases to the same repo, whichever
  published most recently would silently take over the other track's
  "latest" URL. Each track now owns its own moving tag (v13-latest /
  v14-latest), mirroring how beta-release.yml already does this for
  beta-latest.
- Updated .github/RELEASE_WORKFLOW.md for the new dual-track model.

Not run/triggered as part of this change — no push to release/v14 or
main has been made, so no live publish has occurred.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad66abcb06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/auto-release-v14.yml Outdated
Comment thread .github/workflows/auto-release-v14.yml
Comment thread .github/RELEASE_WORKFLOW.md Outdated
Comment thread .github/workflows/auto-release-v14.yml
Repository owner deleted a comment from chatgpt-codex-connector Bot Jul 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Jul 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Jul 31, 2026
@camrun91

Copy link
Copy Markdown
Owner

@greptile-apps please review this

Comment thread .github/workflows/auto-release-v14.yml
Comment thread .github/workflows/auto-release.yml
Reject prerelease/non-semver module.json versions before publishing.
Let only the versioned v13 release claim GitHub's Latest pointer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@camrun91
camrun91 merged commit c67fef4 into main Jul 31, 2026
1 check passed
@camrun91
camrun91 deleted the ci/dual-publish branch August 5, 2026 15:29
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