Skip to content

Conversation

@matthewfeickert
Copy link
Contributor

  • Add GitHub Actions based workflow that uses cibuildwheel to build wheels for target platforms.
  • Add upload of wheels to PyPI on publish using Trusted Publishers.

This workflow copies heavily from the one @henryiii setup for https://github.com/scikit-hep/boost-histogram.

Addresses following components of Issue #104:

  • setup cibuildwheel to build the full matrix of wheels so users don't have to have a compiler installed
  • setup PyPI trusted publisher to automate releases (will require @tacaswell to do this on the PyPI side)

Requires PR #107 to go in first.

* Add GitHub Actions based workflow that uses cibuildwheel to build wheels
  for target platforms.
* Add upload of wheels to PyPI on publish using Trusted Publishers.
* Add cibuildwheel tool table to pyproject.toml, defaulting to using 'build[uv]'
  as the build frontend.
@matthewfeickert matthewfeickert marked this pull request as ready for review November 13, 2025 18:48
@matthewfeickert
Copy link
Contributor Author

@tacaswell this is ready for review now (thanks for merging PR #107).

@matthewfeickert
Copy link
Contributor Author

👋 Ping @tacaswell.

@peterfarrell
Copy link

This would be welcome improvement for us.

@tacaswell
Copy link
Contributor

I'll sort out the pypi side and merge this in the next week.

@matthewfeickert
Copy link
Contributor Author

I'll sort out the pypi side and merge this in the next week.

@tacaswell sounds good and thanks!

For the last remaining bit after that in Issue #104

setup automatic version number based on tags

I think this can be done similarly to how we're doing things in https://github.com/scikit-hep/scikit-hep-testdata and https://github.com/scikit-hep/boost-histogram, which is just to use purefly dynamic version metadata.

@matthewfeickert
Copy link
Contributor Author

👋 @tacaswell just pinging on this in 2026 to remind us both of this. Let me know if there is anything that is needed on my side that I can do to help. 👍

@tacaswell tacaswell merged commit 142eef5 into pytries:master Jan 6, 2026
27 checks passed
@matthewfeickert matthewfeickert deleted the ci/add-cibuildwheel branch January 6, 2026 17:29
@tacaswell
Copy link
Contributor

@matthewfeickert Can you point me to docs on what I need to do on the pypi side?

@peterfarrell
Copy link

@tacaswell It looks like there is a "upload if release" CI job that was skipped in the last run of the workflow.

Looks like the trigger rule is:

if: github.event_name == 'release' && github.event.action == 'published'

It appears creating a new Release (and Git tag) in GH and then using "Publish Release" would trigger this workflow.

@matthewfeickert
Copy link
Contributor Author

Can you point me to docs on what I need to do on the pypi side?

@tacaswell Sure. You want the Adding a Trusted Publisher to an existing PyPI project PyPI docs.

@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Jan 6, 2026

It appears creating a new Release (and Git tag) in GH and then using "Publish Release" would trigger this workflow.

@peterfarrell That's correct, except with less steps. After the Trusted Publisher has been setup on PyPI to allow for publishing through short lived tokens, then to create a release a GitHub Release

release:
types:
- published

should be made to trigger

if: github.event_name == 'release' && github.event.action == 'published'

No additional actions are needed.

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