This article will surely speak to WordPress extension developers who publish to the WordPress repository… and those who don’t publish to it so they don’t have to use SVN.
Indeed SVN is in a way the ancestor of GIT and nowadays rare are the developers who have not switched to Git.
Github is a service hosting GIT repositories that devs like particularly and very much used in the Open-Source world.
A few weeks ago, GitHub released the Github actions.
OK, but what is Github actions?
Simply put, it’s a solution to automate tasks when an action occurs on a repository or a branch of a repository (pull / push…)
That’s where it gets interesting!
Previously, for my personal example, I would version my code on Github and then I would transfer my WordPress extension files by hand to the WordPress.org SVN.
It works… but it’s long and boring!
10Up is one of the big WordPress agencies in the world and they just published an action that allows you to publish on the WordPress repo when you push on a branch of a Git repo, a particular Tag.
This tag will be included in the WordPress repository in order to publish the new version of your work.
How do we do it?
I don’t know if it’s the way to do it the right way as they say… but it’s the way I use it… it will surely get better with time, experience, cough cough cough.
In my project, I create a .github folder, note the dot in front and then a workflows subfolder.
Create in this last folder a file named `main.yml`:
Commit, then push this file.
Go to your Github repository, in the “Actions” tab you should find the action created earlier.
Click on “Add a new secret”
If all went well, the next time you create and push a Git tag, your extension will automatically be published to the Official WordPress repository.
Post Thumbnail: Kid Circus