Skip to content

Add automated PyPI publishing workflow - #8

Merged
asantini29 merged 3 commits into
mainfrom
copilot/publish-to-pypi
Feb 26, 2026
Merged

asantini29 merged 3 commits into
mainfrom
copilot/publish-to-pypi

Conversation

Copilot AI commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

The package was GitHub-only with no PyPI presence. This adds a CI workflow to build and publish the package to PyPI on every push to main, using OIDC Trusted Publishing (no stored secrets).

Changes

.github/workflows/publish.yml (new)

  • build job: builds sdist + wheel via python -m build, uploads as artifact
  • publish job: downloads artifact and publishes via pypa/gh-action-pypi-publish, scoped to a pypi GitHub Environment
  • Triggers on pushes to main
  • Minimal permissions: contents: read globally, id-token: write only on the publish job

pyproject.toml

  • Added keywords, classifiers, and [project.urls] (Homepage, Repo, Docs, Bug Tracker) for a richer PyPI listing
  • Relaxed numpy and numba version constraints from == to >=

Required setup on your end

  1. PyPI Trusted Publisher — go to pypi.org/manage/account/publishing and add a pending publisher:
    • Project: cudakima | Owner: asantini29 | Repo: CudAkima | Workflow: publish.yml | Environment: pypi
  2. GitHub Environment — create a pypi environment under Settings → Environments (add approval gates if desired)
  3. Version bump — PyPI rejects duplicate versions; bump version in pyproject.toml before each release push
Original prompt

This section details on the original issue you should resolve

<issue_title>publish to pypi</issue_title>
<issue_description>The package only lives on github at the moment, so I want to publish it on pypi as well.

Set up the workflow necessary to package and publish to pypi the master branch on push. </issue_description>

<agent_instructions>Prepare everything needed for continuous integration and publishing. prompt me with the required steps on my side</agent_instructions>

Comments on the Issue (you are @copilot in this section)


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

Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>
Copilot AI changed the title [WIP] Publish package to PyPI on master branch push Add automated PyPI publishing workflow Feb 26, 2026
@asantini29
asantini29 marked this pull request as ready for review February 26, 2026 07:27

@asantini29 asantini29 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

here I do not have a master branch, but a main. change the workflow to get triggered by changes on main.
also, in the pyprject.toml, change the requirements for both numpy and numba from "==" to ">="

…ints

Co-authored-by: asantini29 <79840851+asantini29@users.noreply.github.com>

Copilot AI commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

here I do not have a master branch, but a main. change the workflow to get triggered by changes on main.
also, in the pyprject.toml, change the requirements for both numpy and numba from "==" to ">="

Done in commit 2f999da:

  • Workflow now triggers on pushes to main
  • numpy and numba requirements changed from == to >= in pyproject.toml

@asantini29
asantini29 merged commit c877c87 into main Feb 26, 2026
2 checks passed
@asantini29
asantini29 deleted the copilot/publish-to-pypi branch February 26, 2026 07:35
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.

publish to pypi

2 participants