Skip to content

Comments

Deploy workflow candidate for 2.0.0rc1#55

Open
C-Achard wants to merge 3 commits intocy/pre-release-cleanupfrom
cy/final-deploy-workflow-2.0.0rc1
Open

Deploy workflow candidate for 2.0.0rc1#55
C-Achard wants to merge 3 commits intocy/pre-release-cleanupfrom
cy/final-deploy-workflow-2.0.0rc1

Conversation

@C-Achard
Copy link

Deploy workflow using Twine for PyPI uploads with an API token.

Workflow structure:

  • Added detailed usage comments and separated triggers for PR validation and release publishing
  • Renamed jobs (testtest_matrix, buildbuild_release, publishpublish) and updated job descriptions for clarity. (.github/workflows/python-package.yml)

Validation and testing enhancements:

  • Expanded matrix testing to run on Python 3.10, 3.11, and 3.12, ensuring compatibility across multiple versions and preventing fail-fast behavior for better diagnostics. (.github/workflows/python-package.yml)
  • Improved smoke test steps to verify package installation and import, and simplified CLI checks. (.github/workflows/python-package.yml)

Simplify and reorganize the CI workflow: normalize tag pattern quoting and narrow pull_request branches/types. Add permissions.contents=read. Rename the main job to a test_matrix job that runs a Python matrix, streamline setup and pip installs, remove verbose cache steps (use setup-python cache option), and simplify build/twine checks and wheel smoke test (only imports the package; CLI smoke test removed). Add a separate build_release job (runs on tag pushes) to build distributions and upload them as artifacts. Update publish job to download artifacts, install twine, and upload to PyPI using non-interactive --skip-existing; make publish depend on build_release.
Split the workflow into validation and release paths and add clearer step names and safeguards. PRs against main/master now run a validation matrix (3.10, 3.11, 3.12) that builds the package, runs twine check, and smoke-tests installing the wheel; fail-fast is disabled to surface version-specific issues. Tag pushes matching v*.*.* trigger a canonical release build (single Python 3.12) that produces dist artifacts, uploads them as workflow artifacts, and a separate publish job downloads those artifacts and uploads them to PyPI. Other improvements: minimal permissions (contents: read), explicit checkout/setup steps, pip caching enabled, comments for clarity, and use of --skip-existing when uploading to PyPI.
@C-Achard C-Achard self-assigned this Feb 24, 2026
@C-Achard C-Achard added CI Related to CI, tests, workflows... packaging Related to project packaging and release labels Feb 24, 2026
@C-Achard
Copy link
Author

@MMathisLab @AlexEMG This workflow proposal is intended to match the DLC-live usage exactly, and it adds checks to ensure the distributions build and install on all supported versions.

I’d really appreciate your review and feedback or requested changes to ensure it meets our publishing expectations.
Thanks!

@MMathisLab
Copy link
Member

MMathisLab commented Feb 24, 2026

I added the repo to the repos that the twine key can use ✅

@C-Achard
Copy link
Author

I added the repo to the repos that the twine key can use ✅

Amazing thanks !

@MMathisLab
Copy link
Member

@C-Achard we could drop 3.10; we risk perhaps running out of credits in the DLC org for too many tests :)

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

Labels

CI Related to CI, tests, workflows... packaging Related to project packaging and release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants