⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 23, 2025

The publishing workflow created GitHub releases with all wheel files but didn't publish non-dev packages to PyPI.

Changes

Workflow modifications (.github/workflows/_publish.yml)

  • Filter non-dev artifacts: Added jq step to extract Python packages without -dev- in version string
  • PyPI publishing: Added twine-based publishing step that runs before GitHub release creation, blocking release on failure
  • Dry-run support: Uses twine check for validation in PRs/dry-run mode, twine upload in production
  • Secrets: Added pypi-username and pypi-password inputs

Filter implementation

filter: |
  to_entries
  | map(select(.key | startswith("python:")))
  | map(select(.key | contains("-dev-") | not))
  | map(.value.path)

Filters aio.core-0.10.6-dev-py3-none-any.whl out, includes aio.core-0.10.6-py3-none-any.whl.

Secrets configuration (.github/workflows/publish.yml)

Passes PYPI_USERNAME and PYPI_PASSWORD to publishing workflow.

Behavior

  • Runs only when Python version is non-dev
  • Uses for loops (not subshells) with set -e for proper error propagation
  • Exits cleanly when no non-dev artifacts exist
  • PyPI publish failure blocks subsequent GitHub release creation
Original prompt

we have recently adding publishing pipelines to this repo - the most recent being for python

so far it creates a release and uploads the whl files to the releases page

this includes all of the whl files including all that are dev

our previous pipeline pushed the non-dev packages to pypi

i want to bring back that fun - first it will need something that can generate a list of the non-dev artifacts

it should use the jq action that everything else uses - and otherwise follow existing coding styles

using the information gleaned there i want to run a step to do the publishing to pypi - with dry-run where required - if you check the history of the py.yml workflow you will be able to see the previous implementation - which might not be perfect - but should help - eg iirc it uses pants - if that is the case we also should do that - and the secrets that it was using are still available

these step should happen before the release publishing (if it fails it blocks the release, and in the release we can later add some info about the pypi etc)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 9971273
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/694abe7dbd2b710008833aff
😎 Deploy Preview https://deploy-preview-3208--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI and others added 4 commits December 23, 2025 16:00
- Add pypi-username and pypi-password secrets to _publish.yml
- Add step to filter non-dev Python artifacts using jq action
- Add PyPI publishing step using twine before GitHub release
- Support dry-run mode for PyPI publishing
- Pass PyPI secrets from publish.yml workflow

Co-authored-by: phlax <[email protected]>
- Fix dry-run conditional logic in bash script
- Add setup-python step for PyPI publishing
- Correct comment about installing dependencies

Co-authored-by: phlax <[email protected]>
- Fix inputs['dry-run'] reference syntax (hyphenated input names need brackets)
- Replace while-read loops with for loops to properly propagate errors
- Ensures twine check/upload failures are caught by set -e

Co-authored-by: phlax <[email protected]>
- Change inputs['dry-run'] to inputs.dry-run for consistency
- Matches the syntax used throughout the rest of the file

Co-authored-by: phlax <[email protected]>
Copilot AI changed the title [WIP] Add non-dev package publishing to PyPI Add PyPI publishing for non-dev Python packages Dec 23, 2025
Copilot AI requested a review from phlax December 23, 2025 16:10
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.

2 participants