Skip to content

Fix publish to testpypi #665

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

Merged
merged 3 commits into from
Apr 8, 2025
Merged

Fix publish to testpypi #665

merged 3 commits into from
Apr 8, 2025

Conversation

AnesBenmerzoug
Copy link
Collaborator

@AnesBenmerzoug AnesBenmerzoug commented Apr 5, 2025

Description

This PR closes #635

It uses trusted publishing to publish packages to testpypi. This uses the OpenID Connect (OIDC) standard to exchange short-lived identity tokens between a trusted third-party service (Github in this case) and PyPI (TestPyPI in our case) instead of relying on a secret long-lived token that we have to generate and keep in Github secrets.

We should also do the same for publishing to PyPI in a separate PR.

I kept the changes to a minimum and mostly copied the changes from one of my repositories (https://github.com/AnesBenmerzoug/langsfer/blob/main/.github/workflows/main.yml). I haven't tested the changes because if they work a new package would be published on testpypi from this branch, which is something we don't necessarily want.

We should consider switching from bump2version to bump-my-version because it is no longer maintained and the newer package offers nice features such as getting the current version without any parsing or regular expressions.

Changes

  • Configured trusted publishing in testpypi for this repository.
  • Created separate CI job for publishing package to testpypi.

Checklist

  • Wrote Unit tests (if necessary)
  • Updated Documentation (if necessary)
  • Updated Changelog
  • If notebooks were added/changed, added boilerplate cells are tagged with "tags": ["hide"] or "tags": ["hide-input"]

@mdbenito
Copy link
Collaborator

mdbenito commented Apr 6, 2025

Nice. Also much better to have the docs and testpypi jobs separate. Once I merge a couple of bugfixes I will test this and release a dev package.

@mdbenito mdbenito merged commit 8ea248e into develop Apr 8, 2025
0 of 2 checks passed
@mdbenito mdbenito deleted the fix/publish-to-testpypi branch April 8, 2025 15:43
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.

Cannot upload to test.pypi
2 participants