Skip to content

fix(ci): tag releases automatically and keep previews off the production schema - #82

Merged
carhartlewis merged 2 commits into
mainfrom
lewis/fix-release-tagging
Aug 7, 2026
Merged

fix(ci): tag releases automatically and keep previews off the production schema#82
carhartlewis merged 2 commits into
mainfrom
lewis/fix-release-tagging

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

v1.0.0 through v1.3.0 were all tagged by hand. Automatic tagging has never worked here, and
#81 shipped the agent builder to release untagged and unbumped because of it.

Why. With separate-pull-requests: false and one package, release-please's Merge plugin
renames the release branch from release-please--branches--main--components--crm to
release-please--branches--main. On merge, strategies/base.ts reads the component back out of
that branch name and compares it to the package name — undefined never equals crm, so it warns
PR component: undefined does not match configured component: crm and tags nothing. The PR keeps
autorelease: pending, and every later run aborts with There are untagged, merged release PRs outstanding. That is where main has been since 15:49 on 7 Aug.

pull-request-title-pattern was a second, independent break: chore(release): ${version} has no
${scope} or ${component} (release-please warns six times a run) and its (release) compiles to
a regex capture group, so it matched nothing and the fallback title parse failed too.

  • separate-pull-requests: true — one package, so still exactly one PR, now on a branch the tagging
    step can read. Verified with release-please release-pr --dry-run: branch
    release-please--branches--…--components--crm, updating from 1.3.0 to 1.4.0.
  • Drop the broken title pattern. Titles become chore(main): release 1.4.0.
  • Fail the workflow when a merged release PR still carries autorelease: pending. Silence was
    the whole problem: three days of merges reported success while releasing nothing.

Migrations. build-func.mjs ran prisma migrate deploy on every crm-api build, and
DATABASE_URL is one value across production, preview and development — so preview builds migrated
the production database. On 7 Aug the live schema ran six migrations ahead of the live code all day,
and the production deploy of #81 found nothing to apply because a preview had already applied it.
Gated on VERCEL_ENV === "production". The tradeoff is documented: until previews get their own
database, a preview of a schema-changing branch runs against a database without its tables.

v1.3.0 was tagged and #78 relabelled by hand to clear the current jam; v1.2.0 was tagged too, so the
changelog's compare links resolve.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crm-agent Ready Ready Preview Aug 7, 2026 7:04pm
crm-api Ready Ready Preview Aug 7, 2026 7:04pm
crm-app Ready Ready Preview Aug 7, 2026 7:04pm

Request Review

@github-actions github-actions Bot changed the title ci: tag releases automatically again ci: tag releases automatically and keep previews off the production schema Aug 7, 2026
@carhartlewis carhartlewis changed the title ci: tag releases automatically and keep previews off the production schema fix(ci): tag releases automatically and keep previews off the production schema Aug 7, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.yml">

<violation number="1" location=".github/workflows/release.yml:42">
P2: The diagnostic never runs for the jam it is meant to explain: release-please aborts first, and GitHub Actions skips later steps after a failure by default. Adding an explicit `if: ${{ !cancelled() }}` condition would let this query and summary run after release-please fails while still avoiding canceled runs.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

echo "No tag this run — either the release pull request is still open, or nothing releasable landed." >> "$GITHUB_STEP_SUMMARY"
fi

- name: Fail on a merged release pull request that was never tagged

@cubic-dev-ai cubic-dev-ai Bot Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: The diagnostic never runs for the jam it is meant to explain: release-please aborts first, and GitHub Actions skips later steps after a failure by default. Adding an explicit if: ${{ !cancelled() }} condition would let this query and summary run after release-please fails while still avoiding canceled runs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 42:

<comment>The diagnostic never runs for the jam it is meant to explain: release-please aborts first, and GitHub Actions skips later steps after a failure by default. Adding an explicit `if: ${{ !cancelled() }}` condition would let this query and summary run after release-please fails while still avoiding canceled runs.</comment>

<file context>
@@ -38,3 +38,23 @@ jobs:
             echo "No tag this run — either the release pull request is still open, or nothing releasable landed." >> "$GITHUB_STEP_SUMMARY"
           fi
+
+      - name: Fail on a merged release pull request that was never tagged
+        env:
+          GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN || secrets.GITHUB_TOKEN }}
</file context>
Suggested change
- name: Fail on a merged release pull request that was never tagged
- name: Fail on a merged release pull request that was never tagged
if: ${{ !cancelled() }}
Fix with cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/release-please-config.json">

<violation number="1" location=".github/release-please-config.json:28">
P2: This edit removes the explicit `pull-request-title-pattern` and enables `separate-pull-requests: true`. With a single root package the default title pattern kicks in, so the release pull request title changes from `chore(release): 1.4.0` to release-please's default `chore(main): release 1.4.0` (default is `chore${scope}: release${component} ${version}`, and `scope` is the target branch name). Two consequences: 1) it silently diverges from what CONTRIBUTING.md documents as the release PR title (`chore(release): 0.2.0`); 2) release-please matches an already-open release PR by the title pattern and parses the version back out of it, so if a release PR is pending when this ships, the next run won't recognize it and can open a duplicate — the exact "untagged merged release PRs outstanding" jam this repo just recovered from. I'd keep an explicit, stable `pull-request-title-pattern` (e.g. `chore(release): ${version}`) rather than relying on the default, and sync CONTRIBUTING.md with whatever title is chosen.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

"bootstrap-sha": "64f154b086cbad6cac232357dc21c954543ef217",
"separate-pull-requests": false,
"pull-request-title-pattern": "chore(release): ${version}",
"separate-pull-requests": true,

@cubic-dev-ai cubic-dev-ai Bot Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: This edit removes the explicit pull-request-title-pattern and enables separate-pull-requests: true. With a single root package the default title pattern kicks in, so the release pull request title changes from chore(release): 1.4.0 to release-please's default chore(main): release 1.4.0 (default is chore${scope}: release${component} ${version}, and scope is the target branch name). Two consequences: 1) it silently diverges from what CONTRIBUTING.md documents as the release PR title (chore(release): 0.2.0); 2) release-please matches an already-open release PR by the title pattern and parses the version back out of it, so if a release PR is pending when this ships, the next run won't recognize it and can open a duplicate — the exact "untagged merged release PRs outstanding" jam this repo just recovered from. I'd keep an explicit, stable pull-request-title-pattern (e.g. chore(release): ${version}) rather than relying on the default, and sync CONTRIBUTING.md with whatever title is chosen.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/release-please-config.json, line 28:

<comment>This edit removes the explicit `pull-request-title-pattern` and enables `separate-pull-requests: true`. With a single root package the default title pattern kicks in, so the release pull request title changes from `chore(release): 1.4.0` to release-please's default `chore(main): release 1.4.0` (default is `chore${scope}: release${component} ${version}`, and `scope` is the target branch name). Two consequences: 1) it silently diverges from what CONTRIBUTING.md documents as the release PR title (`chore(release): 0.2.0`); 2) release-please matches an already-open release PR by the title pattern and parses the version back out of it, so if a release PR is pending when this ships, the next run won't recognize it and can open a duplicate — the exact "untagged merged release PRs outstanding" jam this repo just recovered from. I'd keep an explicit, stable `pull-request-title-pattern` (e.g. `chore(release): ${version}`) rather than relying on the default, and sync CONTRIBUTING.md with whatever title is chosen.</comment>

<file context>
@@ -25,7 +25,6 @@
 	"bootstrap-sha": "64f154b086cbad6cac232357dc21c954543ef217",
-	"separate-pull-requests": false,
-	"pull-request-title-pattern": "chore(release): ${version}",
+	"separate-pull-requests": true,
 	"pull-request-header": "The changelog below is what will be published as the release notes. Edit the commit subjects, not this PR body — the body is regenerated on every push to main. Merge this before the promotion pull request, so the tag lands on the commit `release` receives."
 }
</file context>
Fix with cubic

@carhartlewis
carhartlewis merged commit 6078a84 into main Aug 7, 2026
9 checks passed
@carhartlewis
carhartlewis deleted the lewis/fix-release-tagging branch August 7, 2026 19:27
This was referenced Aug 7, 2026
@carhartlewis carhartlewis mentioned this pull request Aug 7, 2026
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