Skip to content

Conversation

@AlexLepauvre
Copy link
Collaborator

I have updated the publishing workflow to index the package on pypi. With the current implementation, publishing occurs as follows:

  • On each push, the package will be republished to testpypi
  • On each release, the package will be published on pypi

For the workflow to work, make sure to create an account with pypi and testpypi. Once you have done so, setup the TrustedPublishing thingy on both pypi and testpypi.

Make sure to enter the same name as your package name from your project.toml file under PyPI Project Name. Don't change anything to Environment Name.

Once you have followed these steps, the actions should execute without any issues. Maybe we can then decide to remove the publishing to testpypi for each push

@AlexLepauvre AlexLepauvre requested a review from qian-chu June 19, 2025 16:11

permissions:
contents: read
on: push
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I'm unaware of some hidden condition, but doesn't this mean the workflows run on each push (incl. publishing to PyPI?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not quite, cause just below for the Pypi part, you have this:

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes

So the workflow runs on push, checks if the push has a tag and only then does the pypi release

@qian-chu
Copy link
Collaborator

Currently requesting to replace the PyPI project PyNeon. Will implement the workflow after we hear back from them.
pypi/support#6943

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