-
Notifications
You must be signed in to change notification settings - Fork 37
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
Action: Build process #3
Comments
I like this 👏 Would it make sense for this to be two separate GitHub actions? I admittedly am not yet familiar with them, but it sounds like two different things. Plus, that way plugins which don't need a build step could just use the deploy action, but if necessary a plugin could use both. I also like the idea of having a configurable but standard build command like |
IMO there's no need to re-invent the wheel. There is already a standard for where to put built code - it's called "dist", and it is an archive that can be attached to any release. For simply excluding files, you can use If the action could then commit the contents of the archive to WP.org SVN, this would be all that's needed, really. Pretty pretty please! |
@XedinUnknown There's another set of WordPress plugin-focused Actions available if you're looking to make a ZIP archive. That's what's great about open source, somebody else's project goals may more closely match yours. In this case, the goal is to simplify development workflows and keep everything within GitHub Actions, especially given the recent change of ownership of Travis that has me more than a little concerned about its future. There's also no goal here to produce ZIP archives, those should be served by WordPress.org as the "source of truth" for the installable version of your plugin. GitHub is not end-user friendly or discoverable. I do think if people want to use a |
@helen, perhaps I didn't formulate my thoughts correctly enough. What I meant has nothing to do with creating ZIPs, or using Travis: it is incidental that Instead, it has everything to do with the fact that there is already a standard for where distributable versions of the software are stored, and how they are... distributed. It's called When a WordPress plugin is built, this is a distributable version. This built result should then be attached to a release, and this would enable various already existing tools (such as Composer) to access them, and install them. Since this distributable version already contains the built plugin, i.e. something ready to be installed into a WordPress environment, it only makes sense to deploy that to the WordPress.org SVN repository. A plugin is first and foremost a package, and only then it is a WordPress plugin. Just like it is first and foremost PHP, and only then is WordPress. Therefore, it makes sense to use industry standards in order to ensure interoperability with existing standards-compliant tools. It will also enable developers to use whatever build process they want, including those already set up with Travis/Codeship/Circle/etc, and ship their plugins in the way they already do, e.g. Composer/WPackagist/Github/Pusher/etc. WordPress has many crippling legacy rules that go against industry standards, and now need to be revised or are already being revised - and WPCS is an example of that. I would really appreciate it if this new emerging process would not need to complicate things and deliberately go against what already has been established by many more people who have given it much more consideration and testing. Love <3 |
@XedinUnknown Closing with
I think this makes it pretty clear that there are some fundamental disagreements here along with different goals and approaches. This issue originated in connection with the Action to deploy to WordPress.org, however as stated I am open to making the case for various build processes (which obviously exist, you do not need to further explain them to me), probably the most important thing to do for those is to enumerate the goal and potential workflow - that is, solve for the problem, not the approach. |
@helen, by closing with "Love <3" I only meant that the point I try to advocate is for the benefit of all. No condescension was implied. I'm puzzled, however, by your statement about fundamental disagreements, and the differences in goals. But I'm sure these seeming differences will fade as soon as goals are formulated. I am confident that goals are pretty much the same, as we all want to write solid, flexible, robust software, and to do it in the most conceptually correct and simple way possible. I explained about the different build processes because you seemed to focus your attention on Travis and the fact that it had a change of management, which appeared to be a significant detail used to make the point. I'm just trying to be constructive. I have had the impression that WordPress aims to be inclusive. Creating procedures which limit developers who want to be flexible and standards-compliant is not very inclusive, IMHO. So, let us be constructive. I feel like I have described my goals here. Are these valid, in your opinion? And what are your goals, and goals of other participants and consumers of this project? |
Adding some references here from another project:
I don't yet know if this makes sense to release as a broader usage action, especially because it currently makes some branch structure assumptions. I personally prefer this method to keeping |
A lot of plugins now build into production-ready versions and are not necessarily executable in their development repo state. The next logical step (or rather, the step that should precede deploying to .org) is to run said build. IMO the built version should be committed to an orphaned
stable
branch so that a trackable copy of that is also available over time but is not hanging out as a subfolder.My thought is to do the following for this Action:
stable
in another directory (I’ve done this using Git’sworktree
functionality but I don’t think it’s actually necessary to do this in the context of an Action)npm run build
but allowing the command to be customized. For instance, in another plugin I usenpm run release
when I want to build into another directory and remove all unnecessary files, whereasbuild
builds files into the current directory and those built files are typically.gitignore
-d.stable
directory, empty the directory and then copy everything there.stable
and push.So then the way this would work in terms of a workflow would be that on pushing a tag to
master
, the build Action runs and then the Deploy one, which would then need to point to the directorystable
is in to deploy from as opposed to the default repository workspace.The text was updated successfully, but these errors were encountered: