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 CD workflow #177

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

ravwojdyla
Copy link
Contributor

Re: #154

This is based on sgkit's wheels workflow and https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows, the differences are:

For this to work, @jeromekelleher you will need to configure Trusted Publishing as documented in the link above, copy pasting here:

  1. Go to https://pypi.org/manage/account/publishing/.
    Fill in the name you wish to publish your new PyPI project under (the name value in your setup.cfg or pyproject.toml), the GitHub repository owner’s name (org or user), and repository name, and the name of the release workflow file under the .github/ folder, see Creating a workflow definition. Finally, add the name of the GitHub Environment (pypi) we’re going set up under your repository. Register the trusted publisher.

  2. Now, go to https://test.pypi.org/manage/account/publishing/ and repeat the second step, but this time, enter testpypi as the name of the GitHub Environment.

  3. Your “pending” publishers are now ready for their first use and will create your projects automatically once you use them for the first time.

@jeromekelleher
Copy link
Contributor

I'm not entirely sure what is the purpose of the test branch in this repo, but that's something to consider.

This was just cruft - I've deleted it. We only have main now.

@jeromekelleher
Copy link
Contributor

@benjeffery, you're better up on these ideas than me. Would you mind taking a look and commenting please?

@benjeffery
Copy link
Contributor

This looks good to me - although I would keep the package tests in CI, or trigger this workflow on PRs, as otherwise failures will get missed.

@ravwojdyla ravwojdyla force-pushed the rav-add-cd-workflow branch from 4ec94e3 to 6ac3495 Compare May 3, 2024 11:55
@ravwojdyla
Copy link
Contributor Author

@benjeffery sounds good, ptal 🙏

@jeromekelleher
Copy link
Contributor

OK, I'm going to merge this and see how we go. Thanks @ravwojdyla!

@jeromekelleher jeromekelleher merged commit e8184f1 into sgkit-dev:main May 3, 2024
9 checks passed
@ravwojdyla ravwojdyla deleted the rav-add-cd-workflow branch May 3, 2024 13:04
@ravwojdyla
Copy link
Contributor Author

@jeromekelleher thanks, https://github.com/sgkit-dev/bio2zarr/actions/runs/8938992174 has done just the packaging. According to the current implementation you would need to push a tag to get testpypi release https://github.com/sgkit-dev/bio2zarr/actions/runs/8938992174/workflow#L67. For the actual pypi test or prod push to work, @jeromekelleher as the owner of the project in pypi, you will need to configure the Trusted Publishing (instructions in the comments above).

@jeromekelleher
Copy link
Contributor

Cool - I'll push a release in a few days and see how it goes. I think I've set up the trusted publisher stuff 🤞

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.

3 participants