-
Notifications
You must be signed in to change notification settings - Fork 545
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
Improve Release Automation #345
Comments
from SIG:
Branch
I will create a token in this repo with the same name as the one in the core repo
I think the common way to do this is to use a branch pattern like
Should be possible I would think but it's not a blocker if it's difficult or impossible. |
Thanks for this idea, should definitely be an easier way to go about it :) Should be able to detect when PRs from such a branch are merged and trigger workflow 3 from there. Also a follow up from the SIG, it turns out GitHub only support text input for manually dispatched actions. So, to ensure versions are calculated by the workflow and not manually, we could only accept That being said, only accepting the patch/minor/major keywords could cause confusion by itself, and be less flexible if we wanted to release, say, a 1.0.0-rc.1 which couldn't be computed by the workflow. As for potential typos in the manual input, the release PRs are being reviewed for a reason :) |
This should be easy enough, we can create the release with the Github-provided |
i'm fine entering a version manually I suppose |
Do you have somewhere some example how this workflow looks like (with accepting some text input from a user) ?, can be screenshot etc. ? |
@obecny I'll wire it up to a little sample repo to test it and demonstrate how it works. This is how the input part looks on another repo though (ignore the last run failing because Gradle is annoying): |
It actually turns out that in order to update an existing draft release via GH Actions, the release has to be tagged. I don't think we should be pushing tags prior to publishing the release, in case more changes are added to the release after the release PR is created as was the case in #316. This would also cause some disagreement between the CHANGELOG and the changes listed in the release body. Since it's not a blocker, I'll probably only create the release in workflow 3. Alternatively, you could enforce not having additional changes in a release PR once the workflow is kicked off, but that feels over-constrictive. In the future, e.g. after everything reaches 1.0 stability and we are comfortable not having a manual PR, this problem would go away. |
You could also have a |
@dyladan thanks for the pointer! So after looking into it, I can create a draft release that's linked from the release PR, then publish that release after the PR is merged automatically. However, that process will be pretty complicated because it involves several GitHub API calls in both workflows. I would also be re-generating the body of the release (the changelog) in case additional features were merged while the release PR was open, so manually checking the draft release wouldn't do much good anyway since it'll be overwritten when the PR is merged. tldr: I think since the release is autogenerated, there is little value in reviewing it, so we should simply create the final release after the release PR is merged, along with publishing the packages to NPM. |
Background
Currently, the release process is outlined in RELEASING.md. It is an entirely manual process, and is partially responsible for contrib releases to have fallen behind those in the core repo. To summarize the process, you must first prepare the repo for release by updating the dependency and package versions and updating the changelog, create a PR with these changes (example: #316), make additional fixes to example code/documentation in that PR, get the PR approved & merged, actually release each package to NPM, then finally publish a GitHub release.
Note: There is also a final step to update the changelog again, but this seemed like it was handled in #316 without the need for a separate PR.
Proposal
Many of the commands in the release guide can be automated using GitHub Actions, but some steps like fixing breaking outdated example code are necessarily manual. GH Actions can be used in a 3-step approach to take advantage of automation and manual review:
0.14.0
), and produces a release PR like chore: version 0.13.0 #316. The PR would include version bumps and the changelog update.examples/
andgetting-started/
code as they do today, then approve the PR.As a side note, one benefit of having this 3-step, partially manual approach is that even when new contributors are given write access so that they can be added to CODEOWNERS, they will not be able to complete a release with their access to GH workflows.
Open Questions
dynatrace-oss-contrib
, or a branch within the main repo?The text was updated successfully, but these errors were encountered: