From f635ddffa3b6f8440293c8f8c2b04e6412c5ba64 Mon Sep 17 00:00:00 2001 From: Philip John Date: Thu, 9 Sep 2021 16:20:30 +0100 Subject: [PATCH] Set up auto-deploy to WordPress.org --- .distignore | 6 ++++++ .github/workflows/deploy.yml | 16 ++++++++++++++++ theyworkforyou.php | 30 +++++++++++++++--------------- 3 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 .distignore create mode 100644 .github/workflows/deploy.yml diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..95e924b --- /dev/null +++ b/.distignore @@ -0,0 +1,6 @@ +/.wordpress-org +/.git +/.github + +.distignore +.gitignore diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5f05b0e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,16 @@ +name: Deploy to WordPress.org +on: + push: + tags: + - "*" +jobs: + tag: + name: New tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} diff --git a/theyworkforyou.php b/theyworkforyou.php index 846f5a9..c8ff449 100644 --- a/theyworkforyou.php +++ b/theyworkforyou.php @@ -4,12 +4,12 @@ Plugin URI: http://philipjohn.me.uk/category/plugins/theyworkforyou/ Description: Provides tools for bloggers based on mySociety's TheyWorkForYou.com Author: Philip John -Version: 0.4.2 Author URI: http://philipjohn.me.uk +Version: 0.4.2 Future features list; * Custom date format - + */ /* Copyright 2009 Philip John Ltd (email : talkto@philipjohn.co.uk) @@ -21,7 +21,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - You should have received a copy of the Do What The Fuck You Want To + You should have received a copy of the Do What The Fuck You Want To Public License along with this program; if not, see http://wtfpl.net */ @@ -41,22 +41,22 @@ * Only allow the configuration of widgets etc when an API key is set */ if ( $TWFY_Settings->get_setting('twfy_api_key') ) { - + /** * Get the MPs Recent Activity widget */ require_once 'inc/mps_recent_activity.widget.php'; - + } else { - + /** * Remind the user to add their API key - * + * * Adds an admin notice to to the dashboard, prompting users to enter their * API key. Not entering one disables widgets etc. - * + * * @since 0.4.0 - * + * * @see admin_notices * @url http://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices */ @@ -68,18 +68,18 @@ function twfy_admin_notice() { \ No newline at end of file +?>