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
Infra: Create a GitHub Action to simplify release process #205
Comments
Thanks for the reminder @scls19fr. I will take that into account. 👍 |
Great idea to upload first to TestPyPI! |
Better safe than sorry. 😺 |
@tomschr is it possible to trigger Action manually? It would be really nice to have this in one place. BTW. I have a related idea - maybe we could add also publishing RC releases? For example when someone needs bugfix asap (and does not want to install package directly from git) he could use this version until stable will be released? |
@ppkt Sorry for the delay.
Theoretically yes, but I'm not sure. What's your understanding of "manually": Pushing a button? Running a command?
Yes, that's what I have planned. 😉 My basic idea is to trigger the release process when you open/close a Of course, I need to figure out the details, but that's the plan. I don't know if this works in the end, but we will see.
Who is "he": a contributor, a developer, or this team? If the GitHub Action has been implemented and is stable, the whole process (creating a new release, publishing it to TestPyPI and PyPI, pushing it to ReadTheDocs etc.) can be done automatically. In principle, everybody can start a release (by opening a release branch, see above), but only when you merge it to master, it will be really done. Does that make sense? 😄 |
@tomschr no problem, I'm quite busy too :)
Something like this - maybe editing certain file? I've never used Actions before so I don't even know what's possible :)
Wonderful :)
I'm talking about situation like in ticket: #114 (comment) Clearly there is someone affected by bug in our code and it'll break their workflow until stable version is released. By releasing "unstable" version (with rc part) it should be possible to use that version until stable version of our library is released. Overall - I'm very happy with your idea, CI/CD loop is perfect in this case. |
Thanks, I was busy the last days with other unrelated things, but I hope I can work on this soon.
Ok, I see. Basically, the GitHub Actions are centered around events: When you receive a push event, do this; when you receive a event for labeling, do that. I've never done this, so I'm probably not qualified enough to answer this completely. However, from what I've read, it should be possible. It's just a question of the right Action.
I hope it will work. :-)
Maybe if we whould release some "release candidates" more often, would that help? With my above idea, that would be possible.
Thanks! 👍 |
@python-semver/reviewers Ok, I can report some progress. 😉 (also trying out the new reviewers team). You can find a first example in my fork, see the GH Action 'prepare-release'. I've created a GH Action now which contains two jobs: The next step would be to create another Action which would be triggered when the pull request is closed. This is work in progress and not finished yet. @scls19fr To prepare the first Action, could you do me a favor and create a new token on/for TestPyPI? Do we have an account on TestPyPI already? At the moment, I'm using my own token for my fork, but this needs to be adapted of course. 😉 I would suggest the following procedure (taken from the Packaging Guide, but slightly modified):
For the time being, this should be enough. I only need TestPyPI. If the second Action is ready to be published, we need to do the same procedure for PyPI. During the work on this issue, I've came more and more to the conclusion that we probably need a dedicated repository for our own GH Actions. As we have our own domain now, this should be fairly easy. Separating source code from infra structure looks like a good idea (as it is done with other projects as well). At the moment, it is not really needed, but maybe I need to refactor that in the future. |
I tried to create a token on TestPypi I noticed that I can currently only create a token with "Entire account" scope... which is not something I want (for security reason). So I think I first need to register semver on TestPyPI... to create token just for this project. So I did (according to https://packaging.python.org/tutorials/packaging-projects/ )
So I went to https://test.pypi.org/help/#project-name
I tried with a bad password
so that's not a user issue... but a project name issue on TestPyPi. |
I noticed what is wrong... @tomschr is cybersquatting this project name on TestPyPi 😆 https://test.pypi.org/project/semver/ @tomschr could you go to |
@scls19fr Ohh, I'm sorry! 😲 Argghh, I was under the impression that each name is bound to a user name. Right, I've added that to test with the GH Actions (which kind of worked), but with good intentions. Again sorry for the confusion. Which is your account name on TestPyPI? Of course, I can add you as another owner. The name |
No problem @tomschr |
@scls19fr Ok, you are now added. 😉 |
Ok API token named |
Thanks! Therefor, I would suggest to better name the token |
Ok new API token named I tried to also add |
Thank you very much Sébastien! 👍 @ppkt Karol, do you want to be also on the TestPyPI party? 😄 🎉 If yes, just let us know. |
You can find the token |
Situation
The current release process is described in the file
release-procedure.md
. It's a bit of cumbersome as a lot of things needs to be done manually.Some ideas were already described in #186, this is specific for releases.
Proposed Solution
A GitHub Action seems a good method for this task. Some ideas what our Action could do:
release/VERSION
is merged into master.(not sure which one of this will be better or more feasible)
release/VERSION
matches with the__version__
variable insemver.py
?CHANGELOG.rst
contains the correct version string?release/VERSION
to publish it to the TestPyPI first.release/VERSION
is merged into master (and only then!), do:CHANGELOG.rst
?)It's just a collection of rough ideas. I need to try it what's possible and what is more difficult.
@scls19fr If you have more ideas or disagree with the above, just let me know so I can tailor this Action for our specific use case. :-)
Hint:
I will try it out in my fork first so this repo will be kept clean.
See also
Possible GH Actions to investigate further:
The text was updated successfully, but these errors were encountered: