-
Notifications
You must be signed in to change notification settings - Fork 10
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: improve release workflow #621
Conversation
03ddfbb
to
af16c42
Compare
d6dcf03
to
f61e5ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice improvements to the workflow :D
I added some comments, and requested changes since I'd like to be aware of them (the flow is a bit more complex now, I am like a new developer testing it). Also I wonder, has this workflow being tested? Maybe we can try to do a draft release (that then we cancel) before merging it into dev.
I've made some improvements, mainly to the documentation. I've tested this in the eitprocessing repo, but not yet here.
EDIT: newest tests on eitprocessing aren't working after all 💩 . I will figure it out there and then make changes here. Until then, this PR can stay open. |
be2930b
to
a4ad85a
Compare
Okay, I've added a couple of comments still to be addressed. Just ask for my review again when you'll discover what is the fix needed :) |
Will do. |
Is this ready to be reviewed again? @DaniBodor If not, maybe either remove me from the reviewers or make this PR a draft (otherwise I keep receiving notifications ;)) |
This PR is stale because it has been open for 14 days with no activity. |
d73c0c7
to
606b56f
Compare
This action can now be tested on this test fork: https://github.com/EIT-ALIVE/deeprank2_test_release/. I tested it already and it worked. See if you can follow from the dev readme how to do it and if it's explained clearly enough. Note that in the forked repo, I bugged the release-on-PyPi action, so that we can still check that it gets triggered, but then fails (I don't think it would have been allowed to release a different repo, but didnt want to find out that somehow it does). Also, I believe all the issues you @gcroci2 flagged have been addressed, or did I miss anything? |
This PR is stale because it has been open for 14 days with no activity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a chat about the remaining comments, and let's test this on the fork together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the last suggestions as discussed.
I approved before the PR, but I just noticed some issues. I run the release workflow on the fork and I got this:
The issue is due to the toml file, where the current version of the package seen from bumpversion does not get updated, and thus the error.
Other remaining things before merging:
- Non-expiring token
- Suggestions
OK, let me know what you decide.
|
I tried doing the test, but it gives me: "Releasing from main or dev branch is not permitted, please select a valid release branch." even if I am using a branch called gcroci2-release-test. See here the PR and here the failed action. @DaniBodor |
it's fixed |
a90c325
to
f284d19
Compare
bump2version is no longer maintained
Co-authored-by: Giulia Crocioni <[email protected]>
f284d19
to
3ce7387
Compare
Now the automated release process works great :D the only minor thing left can be to improve the error's triggering if the user selects the main branch from the actions (as I did), because it would fail in this case but it is not clear why (unless you know precisely how the workflow works) @DaniBodor |
3ce7387
to
3472459
Compare
It now displays a message on one of the first steps stating: "Releasing from main or dev branch is not permitted, please select a different release branch." The workflow in the test repo is now the same as the one here in case you want to test it again. On the test repo, I've now tested trying to release from main, dev, or random other branch name, and it gives expected result each time. |
Great, merge this :D |
Finally :D |
An automated workflow can be triggered from the Actions tab (once this is merged to main) that creates a draft GitHub release. The draft release (notes) can be edited if needed, and then manually converted to an actual Release here, which will trigger the PyPi release (note that a draft release does not trigger PyPi release).
The workflow has the following logic:
main
, which is almost never the branch we want to release from. Therefore, ifmain
is selected, the workflow fails, because it was likely by accident forgotten to change the default. Releasing frommain
can still be done manually if needed.main
main
, push to remote.dev
branch)dev
dev
, the hotfix branch is deleted.This workflow was adapted from here.
fix #170