Skip to content

Conversation

trallard
Copy link
Collaborator

@trallard trallard commented Apr 5, 2024

Closes #1754

I only modified the publish.yml workflow in this PR to remove the token.

Separately, I already added this as a trusted publisher in PyPI.

@trallard trallard added the tag: CI Pull requests that update GitHub Actions code label Apr 5, 2024
@trallard trallard added the kind: enhancement New feature or request label Apr 5, 2024
@drammock
Copy link
Member

drammock commented Apr 5, 2024

WDYT about a step for building and checking the wheels with twine before pushing to PyPI? E.g.:

https://github.com/mne-tools/mne-python/blob/026e2622e9f32741ac20bc4c051bdc89bbbd3785/.github/workflows/release.yml#L26-L31

@trallard
Copy link
Collaborator Author

trallard commented Apr 5, 2024

I can do that, I actually thought about it as I was working on #1759
I have been using https://github.com/hynek/build-and-inspect-python-package for build and wheels inspection and it is a delight. But a quick twine check works well to

@drammock
Copy link
Member

drammock commented Apr 5, 2024

I have been using https://github.com/hynek/build-and-inspect-python-package for build and wheels inspection and it is a delight.

ooh, I only looked quickly but that does seem useful!

@trallard
Copy link
Collaborator Author

trallard commented Apr 8, 2024

I have now added the build-and-verify package action to the workflow per @drammock comment

@trallard trallard requested a review from drammock April 8, 2024 11:42
Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

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

wonderful, thanks @trallard

@drammock drammock merged commit 662758e into pydata:main Apr 8, 2024
@trallard trallard deleted the trallard/use-trusted-publisher branch April 8, 2024 16:56
@drammock
Copy link
Member

drammock commented May 3, 2024

@trallard I think maybe this PR isn't working as intended. Even after ditching Codecov so that the tests all pass (prerequisite for even running the build/upload workflow), the upload step is failing:

https://github.com/pydata/pydata-sphinx-theme/actions/runs/8944060825/job/24570535182#step:3:51

If I'm reading the output of prior steps correctly, the artifact is actually named Packages.zip (see also the Artifacts section here) and I think we will need to unzip it (?) before calling the upload step (at least I can't find any mention of handling .zips at https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/).

@drammock drammock mentioned this pull request May 3, 2024
ivanov pushed a commit to ivanov/pydata-sphinx-theme that referenced this pull request Jun 5, 2024
* 👷 Remove token based release from CI

* Add package inspection step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request tag: CI Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use trusted publisher for PyPI releases
2 participants