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

Add an upload destination input to wheels workflow manual dispatch #112

Merged
merged 3 commits into from
Oct 15, 2023

Conversation

alugowski
Copy link
Collaborator

Add an input to manual dispatch of the wheel workflow:
image

Choose between skipping wheel upload, or upload to PyPI or Test PyPI.

Useful if a release run fails for an ephemeral reason and just needs a retry. Just trigger the workflow and specify upload to PyPI.

Also this makes it easier to use Test PyPI for things that don't need to be pushed publicly. This could be testing changes to the PyPI upload process itself, or experiments that shouldn't be public.

@eriknw
Copy link
Member

eriknw commented Oct 14, 2023

Nice trick! This would have already come in handy a time or three, so big +1 from me

@alugowski
Copy link
Collaborator Author

In lieu of setting up an API token for Test PyPI, I took this opportunity to try out their Trusted Publisher method. I set up this workflow to be trusted, but it looks like it needs to be merged into a branch in this repo before the workflow can be run.

@eriknw eriknw self-requested a review October 15, 2023 01:16
@eriknw
Copy link
Member

eriknw commented Oct 15, 2023

Sounds good to me. Are you able to merge PRs now? Feel free to merge and give the wheel trigger to test PyPI a try :)

@alugowski alugowski merged commit 093c2ad into GraphBLAS:main Oct 15, 2023
23 checks passed
@alugowski alugowski deleted the dispatch branch October 15, 2023 01:20
@alugowski
Copy link
Collaborator Author

Merge worked :)

Workflow with upload to test pypi: https://github.com/GraphBLAS/python-suitesparse-graphblas/actions/runs/6521125125

Result should appear here: https://test.pypi.org/project/suitesparse-graphblas/

@alugowski
Copy link
Collaborator Author

Argh, the version thing came up again.

I don't want to use the same default GraphBLAS version hack that the push and PR triggers use because that could cause an unintentional release of the wrong version.

I have a couple ideas to try.

@alugowski
Copy link
Collaborator Author

I tagged this commit as 8.2.1.0a10 so I could run the workflow from the tag and the versioning mechanism would work. Of course running it from a release tag would work as well, but this isn't in a release yet.

Workflow: https://github.com/GraphBLAS/python-suitesparse-graphblas/actions/runs/6521289404

@alugowski
Copy link
Collaborator Author

Success!

Required one more small change to add a token permission, and the trusted publishing now works.

working run:
https://github.com/GraphBLAS/python-suitesparse-graphblas/actions/runs/6528280042

uploaded here: https://test.pypi.org/project/suitesparse-graphblas/8.2.1.0a11/

@eriknw
Copy link
Member

eriknw commented Oct 16, 2023

Huzzah! 🎉

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