Skip to content

Fix publish workflow inputs and add branch verification#40

Merged
masquare merged 1 commit intomainfrom
masquare/fix-publish-workflow
Dec 19, 2025
Merged

Fix publish workflow inputs and add branch verification#40
masquare merged 1 commit intomainfrom
masquare/fix-publish-workflow

Conversation

@masquare
Copy link
Collaborator

Fix publish workflow inputs and add branch verification

♻️ Current situation & Problem

Fixes issues with the PyPI publish workflow (publish.yml):

  1. Incorrect YAML structure for workflow dispatch inputs (nested under target instead of directly under inputs)
  2. Inconsistent casing for TestPyPI (was TestPyPi)
  3. Smoke tests referencing old tests/ directory (should be test/)
  4. Missing safety mechanism to prevent accidental publication to PyPI from non-main branches

Related to: Refactor repo structure and move package management to uv (#38)

⚙️ Release Notes

Improvements:

  • Fixed GitHub Actions workflow YAML syntax for publish workflow dispatch inputs
  • Added branch verification step to prevent publishing to PyPI from non-main branches
  • Updated smoke test paths to match current repository structure
  • Fixed casing inconsistency: TestPyPiTestPyPI

Breaking Changes: None

📚 Documentation

The changes are self-documented through:

  • Clear error message when attempting to publish to PyPI from a non-main branch
  • In-line comments explaining the branch verification check
  • Consistent naming conventions across the workflow

✅ Testing

The workflow has been tested with:

  • Manual workflow dispatch to verify input structure is correctly parsed
  • Branch verification logic confirms that only the main branch can publish to PyPI
  • Smoke tests now correctly reference the test/ directory
  • All changes maintain backward compatibility with existing PyPI and TestPyPI publication flows

Testing performed:

  • ✅ Verified workflow YAML syntax is valid
  • ✅ Tested branch verification logic blocks non-main branch publications
  • ✅ Confirmed smoke test paths exist and are executable

Code of Conduct & Contributing Guidelines

By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@masquare masquare changed the title Fix publish.yml workflow inputs Fix publish workflow inputs and add branch verification Dec 17, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes critical issues in the PyPI publish workflow to ensure correct YAML structure, consistent naming conventions, and safety mechanisms for production deployments.

Key changes:

  • Fixed workflow dispatch inputs structure by removing incorrect nesting under target
  • Added branch verification to prevent accidental PyPI publication from non-main branches
  • Corrected TestPyPI naming consistency and smoke test paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@masquare masquare force-pushed the masquare/fix-publish-workflow branch from fc52a21 to f40fc77 Compare December 17, 2025 11:34
@masquare masquare requested a review from RealLast December 18, 2025 08:05
@masquare masquare merged commit 559c59f into main Dec 19, 2025
2 checks passed
@masquare masquare deleted the masquare/fix-publish-workflow branch December 19, 2025 14:51
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.

3 participants