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

.github: Pypi release workflows #737

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

pdgendt
Copy link
Collaborator

@pdgendt pdgendt commented Sep 18, 2024

Add Github workflows to create Pypi packages and upload to Pypi when a release is published.

@pdgendt pdgendt added this to the v1.3.0 milestone Sep 18, 2024
MAINTAINERS.rst Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
stephanosio
stephanosio previously approved these changes Sep 19, 2024
Copy link
Member

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

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

Not seeing anything obviously wrong with it.

Verify build for all major.minor versions from 3.8 till latest.

Signed-off-by: Pieter De Gendt <[email protected]>
Add a package workflow with the latest python version to test creating a
pypi release.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt
Copy link
Collaborator Author

pdgendt commented Oct 2, 2024

@marc-hb any objections or open comments here?

This is currently the last PR required to start the v1.3 release plan, #735

.github/workflows/release.yml Outdated Show resolved Hide resolved
Upload a pypi package when a Github release is published.

Signed-off-by: Pieter De Gendt <[email protected]>
Update section on creating Pypi releases.

Signed-off-by: Pieter De Gendt <[email protected]>
with:
files: dist/*.whl

- name: Publish package to PyPI
Copy link
Collaborator

@marc-hb marc-hb Oct 3, 2024

Choose a reason for hiding this comment

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

This last PyPI step depends only on the "Download" step, correct? Not on the gh-release step. It wasn't clear to me until I checked the documentation so maybe state that in a 1-line comment?

Actually, wait: shouldn't gh-release be last, after pypi-publish? What is its purpose, just a "backup" of the PyPI release, isn't it? In case of a failure/glitch, I think it's better to have the official PyPI release published without the backup rather than the opposite?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's the same file but the gh-release step attaches it to the GitHub release, instead of uploading it manually.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you missed my point. I'll submit a follow-up PR.

Copy link
Member

Choose a reason for hiding this comment

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

In case of a failure/glitch, I think it's better to have the official PyPI release published without the backup rather than the opposite?

In case of a failure/glitch, you can retrigger the workflow to ensure that the full release workflow completes.

@marc-hb marc-hb merged commit 09ca0ce into zephyrproject-rtos:main Oct 3, 2024
16 checks passed
@pdgendt pdgendt deleted the pypi-release branch October 4, 2024 06:12
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