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

CI: Publish workflow (PyPI) #83

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

CI: Publish workflow (PyPI) #83

wants to merge 11 commits into from

Conversation

danielhollas
Copy link
Collaborator

@danielhollas danielhollas commented Nov 22, 2024

This adds a GHA workflow for publishing to PyPI.

This uses the relatively new Trusted Publisher authentication mechanism, which does not require storing a secret token in repository settings (we should consider migrating aiida-core to this as well imo).

The workflow itself is triggered when a tag is created (Typically by creating a release on GitHub UI). Additionally, one can test the release by publishing to TestPyPI by adding a test-release label to a PR.

I have used this workflow in another (non-AiiDA) repository and it's been working well.

Closes #72

@@ -1,3 +1 @@
"""A pytest plugin for testing AiiDA plugins."""

__version__ = '0.1.0.dev1'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think the __version__ attribute is very useful for this package and it complicates package management so I am removing it. Dissenters will be pointed to a lengthy discussion thread on CPython forum full of people arguing about this. :-D

Copy link
Member

Choose a reason for hiding this comment

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

Please point me to the lengthy discussion, would be a nice read material after dinner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pyproject.toml Outdated
@@ -7,8 +7,8 @@ name = "aiida_test_cache"

[project]
name = "aiida-test-cache"
version = "0.0.1a0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decided to first publish a version 0.0.1 which should be fully backwards compatible and can be used by existing users.

@danielhollas
Copy link
Collaborator Author

@unkcpz @agoscinski can you take a look? Once I have a green light on this workflow I'll add instructions for maintainers into docs.

@danielhollas
Copy link
Collaborator Author

@unkcpz @agoscinski Also can you please send me your user names on PyPI so that I can add you as maintainers of the aiida-test-cache package? Let me know if other people should be added. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release automation
2 participants