Skip to content

Allow publishing a release without creating it on GitHub - #41

Merged
mavam merged 2 commits into
mainfrom
topic/no-github-release
Aug 4, 2026
Merged

Allow publishing a release without creating it on GitHub#41
mavam merged 2 commits into
mainfrom
topic/no-github-release

Conversation

@tobim

@tobim tobim commented Aug 4, 2026

Copy link
Copy Markdown
Member

🔍 Problem

release publish does commit → tag → push branch → push tag → gh release create inside a single command, so there is no seam between the push and the release. Two situations need one:

  • The release belongs in a different repository than the push target. A monorepo that mirrors its sources to a public repo wants the tag in both and the release only in the public one, but the mirror cannot contain the release commit until after the push, so the release must be created later.
  • The release should only appear once downstream builds have proven the tag good. Creating it first means a failing build leaves a published release with nothing behind it.

Neither is reachable with the existing hooks: pre-publish runs before anything is pushed, and post-publish runs after the release already exists.

🛠️ Solution

--no-github-release, combined with --tag, stops after the tag is pushed. The reusable workflow exposes the same choice as:

with:
  create-github-release: false

Both default to the current behavior, so existing callers are unaffected. The command rejects --no-github-release without --tag instead of reporting success without publishing anything.

The gh requirement is now conditional because only the skipped step shells out to it.

💬 Review

  • The skip lands after the tag push, deliberately. Everything git-side still happens; only the GitHub release is left out.
  • Empty deferred publishes fail. --no-github-release requires --tag, and the Python API requires create_tag=True with create_github_release=False.
  • config.repository is still required. It selects the git remote via _select_remote_name, not just the release target, so relaxing that guard would change push behavior.
  • Progress reflects the actual plan. The publish step is omitted when deferred, and a completed deferred publish renders a green progress panel rather than a red failure panel.
  • Coverage exercises the tag push without gh, invalid empty plans, Python API forwarding, confirmation ordering, existing-release edits, progress styling, and reusable-workflow wiring.
  • 254 tests pass; Ruff, Mypy, changelog validation, and formatting checks are clean.

Consumer note: This needs a PyPI release before tenzir/mono can use it. Mono's release workflow installs the published tenzir-ship, so an unreleased flag on main would make --no-github-release an unrecognized option and fail the publish step.

📚 Docs PR: tenzir/content#198

@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: 4a0f928c89

ℹ️ 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 src/tenzir_ship/cli/_release.py
Comment thread .github/workflows/release.yaml
@tobim
tobim force-pushed the topic/no-github-release branch from 4a0f928 to fccc0e3 Compare August 4, 2026 08:32

@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: fccc0e34b3

ℹ️ 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/release.yaml
@tobim
tobim force-pushed the topic/no-github-release branch from fccc0e3 to d59420a Compare August 4, 2026 08:38

@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: d59420a797

ℹ️ 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 src/tenzir_ship/cli/_release.py
@tobim
tobim force-pushed the topic/no-github-release branch from d59420a to 8202893 Compare August 4, 2026 08:47

@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: 8202893492

ℹ️ 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 src/tenzir_ship/cli/_release.py
@tobim
tobim force-pushed the topic/no-github-release branch from 8202893 to 34b8642 Compare August 4, 2026 08:53
@tobim
tobim requested a review from mavam August 4, 2026 08:59
`release publish` commits, tags, pushes, and creates the GitHub release in
one command, so there is no way to sequence anything between the push and
the release. Two situations need that seam:

- The release belongs in a different repository than the one being pushed
  to. A monorepo that mirrors its sources to a public repository wants the
  tag in both and the release only in the public one.
- The release should only appear once downstream builds have proven the
  tag is releasable. Creating it first means a failing build leaves a
  published release with no artifacts behind it.

Add `--no-github-release` to stop after the tag is pushed, and surface it
as the `create-github-release` input on the reusable workflow. The default
is unchanged, so existing callers keep creating releases exactly as
before.

Since only that step shells out to `gh`, the CLI is no longer required
when it is skipped.

Assisted-By: Claude Opus 5 <noreply@anthropic.com>
@tobim
tobim force-pushed the topic/no-github-release branch from 34b8642 to f297925 Compare August 4, 2026 08:59
Require tag creation when GitHub release creation is deferred so a publish
cannot succeed without doing work. Render successful progress in green
and cover the CLI, Python API, and reusable workflow contracts.

Assisted-by: GPT-5.6-sol (pi)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mavam
mavam merged commit df2126a into main Aug 4, 2026
9 checks passed
@mavam
mavam deleted the topic/no-github-release branch August 4, 2026 10:09
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