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

[WIP] PyPI publishing workflow continued #18

Merged
merged 6 commits into from
Jan 15, 2024
Merged

[WIP] PyPI publishing workflow continued #18

merged 6 commits into from
Jan 15, 2024

Conversation

andhus
Copy link
Owner

@andhus andhus commented Jan 5, 2024

TODO:

  • On tag: Make sure tag name matches version - or better infer version from tag, e.g. using versioneer
  • Non-tagged builds should have a version with (something like) -dev-<SHORT_SHA> postfix
  • Don't publish to TESTPyPI on every push (maybe only on special commit message or test-tag?)

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3fe36c7) 100.00% compared to head (86d6813) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          348       350    +2     
  Branches        79        79           
=========================================
+ Hits           348       350    +2     

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

name: >-
Publish to PyPI
name: Publish to PyPI
# TODO we need to make sure the tag matches the version!
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be:

if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') to avoid pushing during a PR

Copy link
Owner Author

Choose a reason for hiding this comment

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

Well, that's not really a problem (?) I think this part is all good.

@gaby
Copy link
Collaborator

gaby commented Jan 8, 2024

Enabling verbose will show what the issue is, but it seems the version format is not valid:

https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#for-debugging

@andhus
Copy link
Owner Author

andhus commented Jan 11, 2024

Just didn't have time to finish this earlier @gaby . The invalid version is due to the latest valid tag is not picked up (the first one starting with v is not compatible with versioneer) and I'll just disable the TestPyPI publishing for now (there could be reasons to publish to test PyPI more frequently/on other triggers, but on every push is just silly :) this was the setup in the guide)

@andhus andhus merged commit d5a1ca1 into master Jan 15, 2024
7 checks passed
@andhus andhus deleted the pypi-publishing branch January 15, 2024 20:36
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