Skip to content

Commit

Permalink
Set up auto-deploy to WordPress.org
Browse files Browse the repository at this point in the history
  • Loading branch information
philipjohn committed Sep 9, 2021
1 parent c03d657 commit f635ddf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.wordpress-org
/.git
/.github

.distignore
.gitignore
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
30 changes: 15 additions & 15 deletions theyworkforyou.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 : [email protected])
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -68,18 +68,18 @@ function twfy_admin_notice() {
<?php
}
add_action( 'admin_notices', 'twfy_admin_notice' );


} // twfy_api_key

/**
* Add a settings link to the plugin page
*
*
* Provides quicker and easier access to the settings page after activating the plugin.
*
*
* @see plugin_action_links_{$plugin}
* @url http://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
*
*
* @param array $links Links for this plugin
* @return array Modified links for this plugin
*/
Expand All @@ -91,4 +91,4 @@ function twfy_add_settings_link( $links ) {
$plugin = plugin_basename( __FILE__ );
add_filter( "plugin_action_links_$plugin", 'twfy_add_settings_link' );

?>
?>

0 comments on commit f635ddf

Please sign in to comment.