Skip to content

Publish to PyPI on real releases - #476

Merged
blink1073 merged 1 commit into
Calysto:mainfrom
blink1073:fix-release-pypi-upload
Aug 17, 2026
Merged

Publish to PyPI on real releases#476
blink1073 merged 1 commit into
Calysto:mainfrom
blink1073:fix-release-pypi-upload

Conversation

@blink1073

@blink1073 blink1073 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

References

No issue filed. Noticed while checking whether the 1.0.5 release carried #475.

Description

Nothing has reached PyPI since 1.0.0. Releases 1.0.1 through 1.0.5 all have tags and GitHub releases, and every publish job reported success, but the upload step inside it was skipped every time:

publish: success
  ✓ Download packages built by build-and-inspect-python-package
  ⊘ Upload package to PyPI
  ✓ Complete job

The step is gated on if: ${{ !needs.release.outputs.dry_run }}. Job outputs are always strings, so on a real release that output is the string "false", which is truthy, making !"false" false and skipping the upload. The only value that would ever run it is an empty string. Because the skip is not a failure, the job stays green and the missing upload goes unnoticed.

octave_kernel already uses the string comparison this changes to, and oct2py avoids the problem by testing inputs.dry_run directly, where it is a real boolean.

Changes

  • The PyPI upload step now tests needs.release.outputs.dry_run != 'true', so real releases publish and dry runs and the nightly scheduled run still do not.
  • Added a comment on the condition so it does not get "simplified" back to a bare negation.

Backwards-incompatible changes

None

Testing

actionlint passes and the workflow parses. The condition itself cannot be exercised without running a release: with dry_run: false the expression now evaluates "false" != 'true' to true, and for the scheduled run and explicit dry runs the output is "true", so it stays false.

Note that 1.0.5 is tagged but was never published, so it will need a roll forward to 1.0.6 after this merges.

AI usage

  • Some or all of the content of this PR was generated by AI.
  • The human author has carefully reviewed this PR and run this code.
  • AI tools and models used: Claude Code (Opus 5)

The upload step is gated on "!needs.release.outputs.dry_run". Job outputs
are strings, so on a real release that value is the string "false", which
is truthy: the negation is false and the upload is skipped. Only an empty
string would ever run it.

Skipping a step is not a failure, so the publish job stayed green while
1.0.1 through 1.0.5 were tagged and released on GitHub without ever
reaching PyPI.

Compare against "true" instead, which is what octave_kernel's release
workflow already does.
@blink1073
blink1073 marked this pull request as ready for review August 17, 2026 02:11
@blink1073
blink1073 enabled auto-merge (squash) August 17, 2026 02:11
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.55%. Comparing base (53211d0) to head (f424d25).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #476   +/-   ##
=======================================
  Coverage   93.55%   93.55%           
=======================================
  Files          51       51           
  Lines        2981     2981           
  Branches      414      414           
=======================================
  Hits         2789     2789           
  Misses        129      129           
  Partials       63       63           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blink1073
blink1073 merged commit 1ff594d into Calysto:main Aug 17, 2026
26 of 28 checks passed
@blink1073
blink1073 deleted the fix-release-pypi-upload branch August 17, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant