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

New publish workflow #568

Closed
wants to merge 5 commits into from

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Feb 27, 2024

The biggest fix here is to stop a release to PyPI if the tag does not start with v.

We now also automatically skip the publish if we are in a fork (it would fail anyway since the secrets are not available on forks).
I've verified the new behaviour on my fork.

with:
files: |
dist/*
generate_release_notes: true

- name: Publish distribution on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It certainly looks like we would publish to PyPI even if the tag did not start with v. I think the new code is correct. Also I've switched the order of PyPI publish and GitHub release. This was, if the PyPI release fails for any reason, we do not create a release on Github.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.07%. Comparing base (3bce8e7) to head (878360f).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #568   +/-   ##
=======================================
  Coverage   87.07%   87.07%           
=======================================
  Files          27       27           
  Lines        4649     4649           
=======================================
  Hits         4048     4048           
  Misses        601      601           
Flag Coverage Δ
python-3.10 87.07% <ø> (ø)
python-3.9 87.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@danielhollas danielhollas changed the title Minor fixes to the publish workflow New publish workflow Mar 1, 2024
@danielhollas danielhollas enabled auto-merge (squash) March 1, 2024 15:31
@danielhollas danielhollas disabled auto-merge March 1, 2024 15:34
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