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

Update the release process to leverage GitHub Actions #37

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

clintval
Copy link
Member

@clintval clintval commented Aug 8, 2024

Dependent on:

  • Making GitHub a trusted PyPi publisher for this package: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
  • Allowing the use of conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
    • If conventional commits are not used, this workflow still does the right thing!
  • Updating the release process: https://github.com/fulcrumgenomics/pybedlite/wiki/Performing-a-Release
    • Move the process out of GitHub wiki and into CONTRIBUTING.md so it is easier to find
    • Process minimizes to:
      1. Manually and locally, bump the package version in the pyproject.toml to your desired SemVer
      2. Open a local branch, commit version bump changes, and then push to a remote branch
      3. Open a PR for your branch with a Git commit message like chore(release): bump to X.X.X
      4. Squash merge the PR
      5. Tag the new commit on main with the same SemVer, triggering a publish to PyPi and GitHub:
        • Source distribution
        • Binary distributions for all Python versions and architectures

The publish workflow looks like:

Screenshot 2024-08-08 at 9 07 41 AM

@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
@clintval clintval temporarily deployed to github-action-ci August 8, 2024 16:20 — with GitHub Actions Inactive
Copy link
Member

@nh13 nh13 left a comment

Choose a reason for hiding this comment

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

A few Qs, and we'll need to set up a few things before merge

.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
@clintval clintval requested a review from nh13 August 8, 2024 16:45
Copy link
Member

@nh13 nh13 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.25%. Comparing base (b01175e) to head (b949f6d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #37   +/-   ##
=======================================
  Coverage   95.25%   95.25%           
=======================================
  Files           8        8           
  Lines         674      674           
  Branches      119      119           
=======================================
  Hits          642      642           
  Misses         18       18           
  Partials       14       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clintval
Copy link
Member Author

clintval commented Aug 8, 2024

@nh13 I might need some help allowing GitHub to be a PyPi publisher. Although I have access to release new versions of pybedlite on PyPi, I don't have authorization to manage the project:

Screenshot 2024-08-08 at 1 20 06 PM

Could you navigate to here and add a GitHub publisher with the following values?

  • Owner: fulcrumgenomics
  • Repository name: pybedlite
  • Workflow name: publish.yml
  • Environment name: pypi

@nh13
Copy link
Member

nh13 commented Aug 8, 2024

Done, for pybedlite (not bedspec as per your link :P)

@clintval
Copy link
Member Author

clintval commented Aug 8, 2024

Done, for pybedlite (not bedspec as per your link :P)

Ah! My playground for ideas :)

@clintval clintval marked this pull request as ready for review August 8, 2024 22:25
@@ -40,8 +40,7 @@ jobs:
with:
submodules: "true"

# Used to host cibuildwheel
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
Copy link
Member

Choose a reason for hiding this comment

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

Should this be ${{ matrix.python }}?

Copy link
Member Author

@clintval clintval Aug 16, 2024

Choose a reason for hiding this comment

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

No, you really do just need a single and separate Python for building the wheels. It's OK to use 3.8 here. I think I've tried bumping it up, but you'll hit compatibility issues with cibuidwheel and a few of the other configuration in the GitHub action. At some point I'll get this up to 3.12 and fixup the rest too. You're welcome to try swapping 3.8 for 3.12 (or something else newer) here and chasing down any errors/warnings with cibuildwheel.

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.

4 participants