How-to: push a GitHub repo to the wordpress plugin servers

I develop my plugin over on github but when it comes to deployment I have to somehow copy my changes into the Wordpress SVN. Currently I do this manually and copy over each file in each directory individually, but this is time consuming and error prone.

I have seen and tried a few scripts but I think I must be running them wrong as they either error or don't copy over the files correctly.

So my question is has anyone achieved this automatically and if so how did you do it?

Thanks!

Topic github svn Wordpress

Category Web


The question was old but now the solution is now available with GitHub actions. Recently GitHub added Github Actions the automated workflow for the GitHub repository.

And the well known company 10up created the "Action WordPress Plugin Deploy".

It is very easy to setup. And as per @otto says we don't need to push each change to svn so, we can set the automation while creating new tag on github.

So, Our github plugin automatically push the code to WordPress repository when we create new release tag.

Useful links:


I don't do it automatically, but it's pretty simple:

Have SVN truck and Git master checked out in the same directory. Use Git for almost everything, as one would with any Git-only project.

Set the stable tag to be trunk, and then when ready to do a release, tag it in Git and then immediately push to trunk. Don't worry about pushing to SVN /tags, as your release history is safe in Git (and Github).

That's about it.

To clean it up, I add .svn to .gitignore, and .git (and tests/, phpunit.xml, etc.) to be ignored by SVN.

A release.sh script would really be nothing more than the following (once the version number in code has been updated, and all committed to Git):

git tag $1
svn ci -m"Release: $1"

See How to Publish a WordPress Plugin – Git from @EAMann for a detailed description.


After reading these responses, I pushed one of my plugins to GitHub and wrote a release.sh script. This script gets a partial checkout of my plugin from plugins.svn.wordpress.org using --depth immediates, and updates the files in trunk/ and assets/. This should simplify a periodic push to svn, using the wordpress.org repository to tag releases rather than maintain development history:

./release.sh
svn cp trunk tags/0.6
svn ci "Sending 0.6 from https://github.com/foo/bar to wordpress.org"

A more generic version might work with a wider variety of plugins, handle deleted files, and update svn tags automatically based off git tags.


see this tutorial from a co-worker of my team: http://www.farbeyondprogramming.com/2011/09/81-how-to-deploy-a-wordpress-plugin-with-git-svn

but he don`t use the solution, its easier to work separate :(

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.