Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Workflow #4

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Release Workflow #4

merged 1 commit into from
Mar 25, 2024

Conversation

mbway
Copy link
Collaborator

@mbway mbway commented Mar 24, 2024

This adds a github action to trigger a release to pypi when a tag is pushed. I have not released anything to pypi before so the workflow may not be optimal. I have tested it with test.pypi.org and it seems to be working.

To complete the setup I think the following things have to be configured:

  • in pypi, configure a 'Trusted Publisher' from this repo to the project maturin-import-hook
  • create an environment in the repo called release
  • add branch protection to main if it is not already in place

I took inspiration from the maturin release workflow as well. Of course that is more complex because it requires compilation for different platforms. I'm not sure if we want to do github/signed releases or whether uploading to pypi is sufficient.

@mbway
Copy link
Collaborator Author

mbway commented Mar 24, 2024

the CI will fail until #3 is merged, because currently the matrix generation is broken.

@mbway mbway requested a review from messense March 24, 2024 22:38
@messense
Copy link
Member

I'll configure pypi trusted publisher tonight.

@messense messense merged commit 55b8111 into PyO3:main Mar 25, 2024
2 of 3 checks passed
@messense
Copy link
Member

@mbway Do you have a pypi account? I can send you a invite to collab on pypi for this package: https://pypi.org/project/maturin-import-hook/

@messense
Copy link
Member

messense commented Mar 25, 2024

I'll configure pypi trusted publisher tonight.

Done!

Publisher information:

Publisher name: GitHub
Workflow: release.yml
Owner: PyO3
Repository: maturin-import-hook
Environment: release

@mbway
Copy link
Collaborator Author

mbway commented Mar 25, 2024

Thanks. My pypi account is https://pypi.org/user/mbway/

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