Skip to content

ci: automatically publish merged version bumps - #530

Open
vvahidd wants to merge 6 commits into
mainfrom
codex/automatic-release
Open

vvahidd wants to merge 6 commits into
mainfrom
codex/automatic-release

Conversation

@vvahidd

@vvahidd vvahidd commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

After tests and coverage pass on main, tag a changed package version and trigger the existing Release workflow. Ordinary merges and already tagged versions are skipped.

Validated workflow syntax and the unchanged-version, new-version, and existing-tag cases.

@github-actions github-actions Bot added documentation Improvements or additions to documentation github_actions labels Nov 13, 2026
@vvahidd vvahidd changed the title ci: publish tested version bumps automatically ci: automatically publish merged version bumps Nov 13, 2026
@vvahidd
vvahidd marked this pull request as ready for review November 13, 2026 21:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T20:14:40.386147Z 4d832de New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 78bd6232d1

ℹ️ 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/test.yml Resolved
Comment thread .github/workflows/test.yml Resolved
Comment thread .github/workflows/test.yml Resolved
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (55aad85) to head (4d832de).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
+ Coverage   91.66%   91.68%   +0.01%     
==========================================
  Files         216      216              
  Lines       30533    30533              
  Branches     5672     5672              
==========================================
+ Hits        27989    27993       +4     
+ Misses       1458     1457       -1     
+ Partials     1086     1083       -3     

☔ 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.

@Alisama20 Alisama20 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The guards work. I replayed the step in scratch repos: a bump push tags and dispatches once, a non-bump push and an existing tag both exit quietly. Three things before the first real release goes through it:

  • It compares against before of one push. If the bump commit's run fails (a flaky test, Codecov), the next merge sees equal versions and the release is silently lost. Comparing against the latest tag (publish if refs/tags/$version doesn't exist and the version is newer) fixes that and the downgrade case.
  • The tag is pushed before the dispatch. If gh workflow run fails, a re-run sees the tag and skips, so nothing is released. Dispatch when no release exists for the tag, or retry the dispatch on its own.
  • Only pyproject.toml is read, but tbump also writes README.md and src/gsim/__init__.py. A check that all three agree would avoid a wheel whose __version__ disagrees with its metadata.

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

ℹ️ 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".

run("git", "push", "origin", f"refs/tags/{version}")

# Tag pushes made with GITHUB_TOKEN do not trigger push workflows.
run("gh", "workflow", "run", "release.yml", "--repo", repository, "--ref", version)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Recover releases that fail after the PyPI upload

When release.yml fails after its PyPI step succeeds but before Release GH creates a non-draft release (for example, the draft-release API call fails), the run is completed and published_tags() still reports the version as unpublished, so this line dispatches the entire workflow again. The retry then attempts to upload the immutable version to PyPI a second time, fails before reaching the GitHub-release step, and every later main push repeats the same failure; handle this partial-publication state separately or make the publishing workflow safely resumable.

AGENTS.md reference: AGENTS.md:L56-L59

Useful? React with 👍 / 👎.

@vvahidd
vvahidd force-pushed the codex/automatic-release branch from ce7fb83 to 4d832de Compare December 1, 2026 20:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants