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

Updates to build and release toolchain #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ovidner
Copy link

@ovidner ovidner commented Oct 13, 2023

Hej! It has been a long time since the latest release to PyPI (as noted by #12 (comment)). I guess there can be thousands of good reasons for that, but if "the boring process of doing it manually" is one of those reasons, this PR might have the fix :)

This PR:

  1. Replace setup.py and MANIFEST.in with the new and fancy pyproject.toml.
  2. Introduces hatch for building and hatch-vcs for automatic versioning based on git tags.
  3. Adds a GitHub Action for automagic build and release to PyPI when a release with a vX.Y.Z tag is created on GitHub.

How to make it work

If this is interesting, the following steps need to be carried out for the magic to work.

On the GitHub repo clicumu/pyDOE2, a pypi environment must be created:
Screenshot 2023-10-13 at 22 51 43
The default settings should work just fine.

On PyPI, the package must have the GitHub repo/environment set as a trusted publisher, see an example from one of my repos and what to fill in under Add a new publisher:
Screenshot 2023-10-13 at 22 40 53

After this, it should probably work just fine when creating a new GitHub release with a version tag, e.g., v1.2.2. See the faux release on my fork and the resulting workflow run (failing because I obviously can't publish to pyDOE2 on PyPI).

Let me know if I can help, or make any adjustments!

Fridens liljor!

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.

1 participant