Conversation
Updated the workflow to streamline the release process and improve Python setup.
There was a problem hiding this comment.
Pull request overview
Refactors the GitHub Actions workflow responsible for building and publishing the Python package to PyPI, aiming to simplify the release pipeline and Python setup.
Changes:
- Collapses prior multi-job matrix/build/publish workflow into a single
releasejob. - Adds pip cache configuration and switches Python setup to
actions/setup-python@v5withpython-version: 3.x. - Gates the publish step to run only on
pushevents while still triggering the workflow on PR events.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@MMathisLab I've opened a new pull request, #70, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@MMathisLab I've opened a new pull request, #71, to work on those changes. Once the pull request is ready, I'll request review from you. |
…n cache (#71) * Initial plan * Fix checkout order and use setup-python built-in pip cache Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com> Agent-Logs-Url: https://github.com/DeepLabCut/DeepLabCut-live-GUI/sessions/21ab9ebe-25bd-4963-b3c9-01ecbf60de45 * Upgrade actions/checkout and setup-python to v6 Update .github/workflows/python-package.yml to use actions/checkout@v6 and actions/setup-python@v6. Keeps the workflow up-to-date with no functional changes to Python version or caching. * Cache only pyproject.toml in CI Update GitHub Actions workflow to use pyproject.toml as the sole cache-dependency-path for pip, removing requirements.txt, setup.cfg, and setup.py to avoid unnecessary cache invalidation. Add a clarifying comment and clean up trailing whitespace in the workflow file. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com> Co-authored-by: Cyril Achard <cyril.achard@epfl.ch>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Add a workflow_dispatch input (release_tag) to allow manual builds/publishes for a specific tag. Validate the provided tag format in a new bash step when triggered manually, and adjust the checkout step to use the provided tag ref for workflow_dispatch events. Also remove an obsolete comment in the Python setup step.
|
Note : I added workflow_dispatch so we can manually rerun a release for a specific tag after the original tag push has already happened. That gives us a clean recovery/debug path for release tags using a release_tag input plus checkout by tag ref. @MMathisLab If this is not desired, we can rely on GitHub’s built-in “Re-run jobs” for the original tag-triggered workflow run instead, but this will use the previous version of the workflow, not the one from this PR, as the Re-run job function uses the code from when the run was triggered, i.e. the previous version. |
There was a problem hiding this comment.
One small note for later : this updated workflow has hooks to run on PRs, but only installs python, checks out the code and installs some deps (OpenGL, packaging deps), without doing anything related to our package or the twine upload (i.e. does not build the package, validate the distribution, run smoke tests, or attempt any PyPI upload).
None of this is required for aligning the workflow however.
|
the issue is the permissions; see basecamp -- no action needed on this PR |
Simpler workflow, matching other DLC / M-Lab managed deploy procedures used across organization stacks.