Skip to content

publish-release: gate auto-publish to bot merges on main only (release-model)#388

Merged
ptr727 merged 6 commits into
developfrom
feature/release-gate
Jul 10, 2026
Merged

publish-release: gate auto-publish to bot merges on main only (release-model)#388
ptr727 merged 6 commits into
developfrom
feature/release-gate

Conversation

@ptr727

@ptr727 ptr727 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Part of the fleet release-model change: a human PR merge never auto-cuts a release; only a bot (Dependabot/codegen) code-merge to main does, plus manual dispatch.

  • push trigger narrowed to [main] — bot merges to develop no longer release; develop prereleases come via workflow_dispatch.
  • Publish gated to github.actor == 'ptr727-codegen[bot]' (the App merges every bot PR) / dependabot[bot], so a human merge/promotion to main skips — the maintainer dispatches when release-ready. The paths: filter still means an Actions-only bump publishes nothing.
  • Empirically validated actor values on real runs (bot merges → App identity; human merges → ptr727).

Header/comment updated to match. Takes effect on main once promoted. Companion to LanguageTags #255; template docs (WORKFLOW.md/AGENTS.md) + PUBLISH_ON_MERGE deletion follow.

🤖 Generated with Claude Code

A human PR merge no longer auto-cuts a release. On a push (main-only,
release-affecting paths) the release runs only for a bot merge - the
codegen App merges every Dependabot/codegen PR, so its identity gates it;
a human merge/promotion skips and the maintainer dispatches when ready.
Narrow the push trigger to main so bot merges to develop don't release;
develop prereleases come via dispatch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 04:43
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.62%. Comparing base (5b38db4) to head (2b2bf73).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #388   +/-   ##
========================================
  Coverage    40.62%   40.62%           
========================================
  Files           10       10           
  Lines         1024     1024           
  Branches        99       99           
========================================
  Hits           416      416           
  Misses         580      580           
  Partials        28       28           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

Pull request overview

Updates the release publishing workflow to align with the new release model: auto-publishing happens only on bot-driven merges to main, while human merges and develop prereleases require an explicit manual dispatch.

Changes:

  • Narrow on.push.branches to [main] so pushes to develop no longer auto-publish.
  • Gate the publish job so push-triggered publishes run only when github.actor is an allowed bot actor; allow workflow_dispatch publishes for main/develop.
  • Update workflow header/policy comments to describe the new release behavior.

Comment thread .github/workflows/publish-release.yml Outdated
Comment thread .github/workflows/publish-release.yml Outdated
…bot)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 04:51

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

…task)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 13:48

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/publish-plan-task.yml
Comment thread .github/workflows/publish-plan-task.yml
…ch serves Docker)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 13:54

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 13:59

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

… inherit

secrets: inherit passes every secret, so singling out CODECOV_TOKEN is
misleading noise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 14:15

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 1568ac1 into develop Jul 10, 2026
12 checks passed
@ptr727
ptr727 deleted the feature/release-gate branch July 10, 2026 15:40
ptr727 added a commit that referenced this pull request Jul 10, 2026
Promotion of `develop` -> `main`.

Carries:
- **#388** — gated release model: `publish-plan-task.yml` (plan job) +
gated `publish-release.yml` (a human merge never auto-publishes; only a
bot code-merge to main, or a dispatch, does) + codecov-comment cleanup.
- **#389** — `Directory.Packages.props` nuget-deps bump.

**This promotion is also the live gate test.** The diff touches
`Directory.Packages.props` (a release-affecting path), so on merge the
now-gated `publish-release.yml` will trigger — and because the promotion
is a **human** merge (`github.actor = ptr727`), the `plan` job resolves
`publish=false` and **skips the publish**. That proves a human
merge/promotion does not auto-cut a release. (The next
Dependabot/codegen merge to `main` — `actor = ptr727-codegen[bot]` —
will publish.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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