-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
GitHub Actions: Build Plugin zip, create release draft, attach zip #19626
Conversation
@youknowriad is the best person to share feedback and follow along 😄 |
I think you could probably test it on a fork. |
How is this different from our release script and what benefit do we get compared to it? |
You mean
More automation -- it would automatically create release zips once a tag is added, rather than requiring people to spend time running the script locally, blocking them from coding. This means that releases become cheaper, and we might e.g. experiment with alpha releases at some point (which might come in handy for hosted versions of Gutenberg 😬). It also helps define a reproducible environment for builds. Finally, if this proves valuable, we might look into automating other parts of the release process. There's e.g. a GitHub action to publish plugins to the WP.org plugin SVN repo, or we might be able to automate release of |
Ah, good thinking! I might give that a try 🙂 |
No, I meant compared to our current I'm really glad that you're putting effort to try to help them automate things and I'd love to see more automation in flows we didn't explore yet but It does feel like we're already pretty well covered with the release tool. https://github.com/WordPress/gutenberg/blob/master/docs/contributors/release.md |
8e81494
to
f798fcc
Compare
Size Change: 0 B Total Size: 1.21 MB ℹ️ View Unchanged
|
Pushing the code from this branch to my fork of the repo, I finally got this to work 🎉 Did the following locally:
This triggered the action to build a Gutenberg zip, create a Release Draft, and attach the zip to it in under 10 minutes. I now have to check if the zip is complete and works. |
The |
8202794
to
95c70c7
Compare
I've worked a bit more on this and tested it on my repo fork (thanks @talldan for the suggestion)! I've updated the PR desc with reproducible testing instructions. This seems to be working quite smoothely now -- please give it a try! Would we be open to reconsider merging this PR? I think we could still keep the Overall, I hope that eventually we'd end up with a setup where releasing the plugin doesn't require cloning the GB repo into a temporary directory plus the SVN plugin repo onto one's own machine, but to offload all that to GH. I hope that this will help make the release process (feel) more lightweight, and potentially allow us doing more RCs (and possibly nightlies, at some point) to aid with testing on a variety of setups (e.g. big multi-user WP instances) prior to releases. |
I think that's a great goal but for me it feels like we're recreating the script why not just provide a |
Thanks Riad! 🤔 It seemed to make sense to me to have the build plugin action only create the zip and attach it to a draft release, but wait for the user to actually publish -- to give the user a final chance to revise the release. (I'd probably remove the CLI step where the user is supposed to fill in the changelog -- they can do that in the GH release UI instead; mostly so we don't duplicate interactive steps.) I'd then couple the SVN upload to the publishing of the GH release, i.e. when things are 'final'. To the user, that should all feel fairly transparent and consistent: they'll first get a draft release to fill in and publish, and once that's done, they'll automatically get the plugin uploaded to SVN. Curious to hear your thoughts! |
One more note here, I think we have somewhat of a separation of concerns already that will apply quite well to what we're doing here:
|
For me, I still feel these intermediary steps will just add friction over what we currently have. Meaning, we should click a single "button" to release everything and I shouldn't be asking myself if I should create a tag from master or a tag from a release branch or anything. I can just say "release major", "release patch" and that should be enough. |
Not sure I'm following 🤔 That part of the script could stay the same, you could continue to The goal is definitely not to add friction here 💯 Hope I've been reading you correctly, please LMK if I haven't! |
There's something I'm missing here, the only places where we create tags is in these commands, we don't do that manually and these commands do need the zip as well for the SVN part. so I'm not really sure it makes sense to separate these two flows? |
931af11
to
8b62586
Compare
This seems to work well 👍🏻 ✅ Action output: https://github.com/fullofcaffeine/gutenberg/runs/1330020144 I can't approve but I'll be following the discussion. It's not entirely clear to me what are the main benefits over the CLI approach, other than moving the UI to a GUI :) but I haven't read all the text yet. |
I have been working on the other end of a similar process with the goal to release a daily Gutenberg Now @ockham, your PR helps with automating the build process and push it to my fork. Thank you! |
Superseded by #27488. |
Description
First stab at writing a GitHub action to build Gutenberg upon creating a tag that starts with
v
, and creating a draft release with the build attached to it.Based on
build-plugin-zip.sh
.Using https://github.com/actions/create-release and https://github.com/actions/upload-release-asset.
How has this been tested?
git remote add ockham git@github.com:ockham/gutenberg.git
if your GH username isockham
🙂 ).master
branch (you can reset later):v
), e.g.git tag v9.2.0-rc.1
.git push --tags ockham
.(I've used my Gutenberg fork as an example, you can see the relevant action and release drafts from previous runs there.)
Types of changes
Build tools automation
TODO
Checklist:
/cc @sirreal @gziolo