Categories
Snippets

Github to WordPress.org deploy script

Today I polished, documented, and open sourced a bash script I’ve been using to do plugin deployments from Github to WordPress.org (plus I wanted an excuse to use the new WordPress.com desktop app which is awesome by the way). It’s based on code Barry Kooij sent me a while back. You can find it here:

https://github.com/mikejolley/github-to-wordpress-deploy-script

It handles Github tagging, removing junk files, and SVN tagging with minimal effort. It also has a quick checklist to stop you forgetting to set things in the readme.txt like the stable version (I’ve been guilty of forgetting this in the past).

Once downloaded to your machine, the script requires a Github access token, and a few edits to tell it which plugin you’re deploying.

After you’ve added the details specific to your project, you simply need to open it’s parent directory in terminal, and run the command:

sh release.sh

It then prompts you for a version, branch, and handles the deployment process.

demo

The above demo is from a release of WP Job Manager I did today showing it working nicely. Hope it’s useful!

By Mike Jolley

I help build things at Automattic.

15 replies on “Github to WordPress.org deploy script”

Great stuff! I’ve actually been working on something just like this this week.

Any particular reason for using the GH API to tag the release, rather than just ‘git tag’?

Thank you, Mike, this is a great helper! One question: How do you handle updates for a plugin’s “assets” directory on w.org? I understand once screenshots, banners, and icon images have been committed once, they rarely need to be updated; just asking out of curiosity. The script doesn’t handle assets in the sense of w.org, does it? Would you just edit the script when you need to add a screenshot to a repo?

HI Mike, need to kick the tires on this. I’m curious if it can push from a Git branch to an SVN tag? Basically, I want to push to a tag so that the plugin is NOT updated live. Thanks!

Comments are closed.