Skip to content

Conversation

inknos
Copy link
Contributor

@inknos inknos commented Sep 5, 2025

The step to create GH release is clunky, confusing, and fails most of the time. The code was supposed to be triggered on a new tag, but it's simpler to create a release from the GH dashboard and let it create the tag as well, which triggers pypi.

Overall, the workflow mirrors the one from packaging.python.org page but with few differences:

  • "if" condition in publish-to-test-pypi, to run on main branch only
  • skip-existing test.pypi releases is true to try and reduce the pypi usage

https://packaging.python.org/en/latest/guides/
publishing-package-distribution-releases-using-
github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow

The step to create GH release is clunky, confusing, and fails most of
the time. The code was supposed to be triggered on a new tag, but it's
simpler to create a release from the GH dashboard and let it create the
tag as well, which triggers pypi.

Overall, the workflow mirrors the one from packaging.python.org page
but with few differences:
  - "if" condition in publish-to-test-pypi, to run on main branch only
  - skip-existing test.pypi releases is true to try and reduce the pypi
    usage

https://packaging.python.org/en/latest/guides/
  publishing-package-distribution-releases-using-
  github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow

Signed-off-by: Nicola Sella <nsella@redhat.com>
Copy link
Contributor

openshift-ci bot commented Sep 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inknos

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@inknos
Copy link
Contributor Author

inknos commented Sep 5, 2025

looks like packit is sleeping today, therefore /hold

Copy link
Member

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

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

I am not sure if having all these jobs in one file is a good idea. I would split them into separate files: one for publishing to PyPI, a second for TestPyPI, and a third for builds with specific triggers. This would allow you to trigger an action when a build is done, for example, or when a tag is published, or have it work only on the main branch.

Also, I am not sure if signing the Python package is required.

@inknos
Copy link
Contributor Author

inknos commented Sep 8, 2025

Also, I am not sure if signing the Python package is required.

Quoting from here in the tips box

Starting with version v1.11.0, pypa/gh-action-pypi-publish generates and uploads PEP 740-compatible attestations for each distribution by default. No additional manual signing steps are required.

we are good with signing

@inknos
Copy link
Contributor Author

inknos commented Sep 8, 2025

I am ok to split the files, I'll work on it later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants