Skip to content

Commit

Permalink
New GitHub deploy process and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
markjaquith committed Jul 13, 2023
1 parent d3fb9bd commit 6781e8e
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 12 deletions.
33 changes: 33 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
tests
yarn.lock
.editorconfig
.git
.yarn
.pnp.cjs
.php_cs.dist
.gitignore
.gitattributes
.yarnrc.yml
readme.md
composer.json
composer.lock
package.json
Gruntfile.js
phpcs.xml
babel.config.js
.vs-code
.github
.sass-cache
.travis.yml
node_modules
release
bin
.nvmrc
phpunit-7.0.phar
.distignore
phpunit.xml.dist
src
rollup.config.js
dist/index.html
.wordpress-org
webpack.config.js
17 changes: 17 additions & 0 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Plugin asset/readme update
on:
push:
branches:
- trunk
jobs:
trunk:
name: Push to trunk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress.org plugin asset/readme update
uses: markjaquith/action-wordpress-plugin-asset-update@only-readme-and-assets
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
IGNORE_OTHER_FILES: true
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to WordPress.org
on:
push:
tags:
- "*"
jobs:
tag:
name: Deploy Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Build
run: |
yarn
yarn package:prep
- name: WordPress.org Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
26 changes: 26 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,32 @@ module.exports = grunt => {
},
],
},
readme_txt: {
src: ['readme.md'],
dest: 'readme.txt',
replacements: [
{
from: /^# (.*?)( #+)?$/gm,
to: '=== $1 ===',
},
{
from: /^## (.*?)( #+)?$/gm,
to: '== $1 ==',
},
{
from: /^### (.*?)( #+)?$/gm,
to: '= $1 =',
},
{
from: /^.*travis-ci.org.*$/im,
to: '',
},
{
from: /\n{3,}/gm,
to: '\n\n',
},
],
},
svn_readme: {
src: ['release/svn/readme.md'],
dest: 'release/svn/readme.txt',
Expand Down
2 changes: 1 addition & 1 deletion classes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CWS_WP_Help_Plugin {
const MENU_SLUG = 'wp-help-documents';
const CRON_HOOK = 'cws_wp_help_update';
const POST_TYPE = 'wp-help';
const CSS_JS_VERSION = '1.7.1';
const CSS_JS_VERSION = '1.7.2';

protected function __construct() {
$this->hook( 'init' );
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wp-help",
"title": "WP Help",
"description": "A WordPress plugin",
"version": "1.7.1",
"version": "1.7.2",
"homepage": "",
"author": {
"name": "Mark Jaquith",
Expand All @@ -15,6 +15,13 @@
"useTabs": true,
"trailingComma": "es5"
},
"scripts": {
"build:production": "grunt build:production",
"clean-dist": "git clean -f dist",
"make-zip": "wp dist-archive . wp-help.zip",
"package:prep": "yarn run clean-dist && yarn run build:production",
"package": "yarn run package:prep && yarn run make-zip"
},
"keywords": [],
"dependencies": {
"@babel/core": "^7.7.2",
Expand Down
9 changes: 1 addition & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Donate link: http://txfx.net/wordpress-plugins/donate
Tags: help, documentation, client sites, clients, docs
Requires at least: 4.9
Tested up to: 5.8.2
Stable tag: 1.7.1
Stable tag: 1.7.2

Site operators can create detailed, hierarchical documentation for the site's authors, editors, and contributors, viewable in the WordPress admin.

Expand Down Expand Up @@ -157,10 +157,3 @@ Upgrade if you want to use WP Help in one of these languages: Bulgarian, German,

### 0.1 ###
* Initial version

## Roadmap ##

I'm not saying these things are definitely coming, but they're the sort of things that are on my radar, in case you were wondering:

* Multiple sync sources
* Multiple sync groups (segment top level documents into "categories" and get a unique sync URL for each)
157 changes: 157 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
=== WP Help ===

Contributors: markjaquith
Donate link: http://txfx.net/wordpress-plugins/donate
Tags: help, documentation, client sites, clients, docs
Requires at least: 4.9
Tested up to: 5.8.2
Stable tag: 1.7.2

Site operators can create detailed, hierarchical documentation for the site's authors, editors, and contributors, viewable in the WordPress admin.

== Description ==

Site operators can create detailed, hierarchical documentation for the site's authors, editors, and contributors, viewable in the WordPress admin. Powered by Custom Post Types, you get all the power of WordPress to create, edit, and arrange your documentation. Perfect for customized client sites. Never send another "here's how to use your site" e-mail again!

**NEW**: You can now pull in help documents from another WP Help install, and they will be automatically updated when the source documents change (even additions and deletions!). Perfect for WordPress multisite installs, or consultants with a large number of client installs.

== Installation ==

1. Upload the `wp-help` folder to your `/wp-content/plugins/` directory

2. Activate the "WP Help" plugin in your WordPress administration interface

3. Visit "Publishing Help" in the menu to get started (note that you can change the location and title of this menu item)

== Frequently Asked Questions ==

= Who can view the help documents? =

Anyone who can save posts. So by default, Authors, Editors, Administrators, and Contributors

= Who can edit the help documents? =

Anyone who can `publish_pages`. So by default, Editors and Administrators.

= How do I reorder the documents? =

Just like you'd reorder pages. Change the `Order` setting for the page, in the `Attributes` meta box. To make something be first, give it a large negative number like `-100`.

= How do I link to another help page from a help page? =

Use WordPress' internal linking feature. When launched from a help document, it will only search for other help documents.

= How do I change the default help document? =

Edit the help document you want to be the default. Check the "Set as default help document" checkbox, and save. This will now be the default document.

= Why can't I edit some documents? =

Documents that came from another WP Help install that is currently connected, cannot be edited (your changes would just be overwritten anyway). In order to edit these documents, you need to disconnect from sync permanently, or edit the at their source WP Help install.

= Will enabling sync delete my existing documents? =

Enabling sync will delete any documents that came in via another sync source. **But it will not delete locally-created documents.**

= Can I have multiple sync sources? =

Not right now. But what you can do, is have a WP Help install that aggregates another WP Help install and is then itself used as a source for the combination of the two sites docs, to be delivered to a third site.

= Why can't I reorder some docs using drag and drop? =

You cannot internally sort synced documents — just move the whole "chunk" of synced documents around.. Also, if a local help document is the only document in its level, it won't get a drag handle, because there's nothing to reorder. Give it a sibling, and you'll be able to order them how you like.

== Screenshots ==

1. The Publishing Help screen, which lists and displays available help documents.

== Upgrade Notice ==

= 1.3 =
Update for WordPress 3.8 support.

= 1.2 =
Update for better UI and support for WordPress 3.5.

= 1.1 =
Sexy drag and drop reordering, and order-syncing through the sync API.

= 1.0 =
MASSIVE UPDATE. Sync help documents from another WP Help install. Rename and relocate the menu item. Dashboard widget. Easier navigation.

= 0.3 =
Upgrade for a French translation.

= 0.2 =
Upgrade if you want to use WP Help in one of these languages: Bulgarian, German, Spanish, Mexican Spanish, Macedonian, Dutch, Brazilian Portuguese, or Russian.

== Changelog ==

= 1.7.0 =
* Block Editor (Gutenberg) support
* Video display improvements
* Smaller build

= 1.6.0 =
* CSS improvements (props @mrwweb).
* Switch from CoffeeScript to ES6 and Babel.
* Responsive styles.

= 1.5.4 =
* Bump supported WordPress version.

= 1.5.3 =
* Make add/manage buttons use proper permissions.
* Update styles.
* Bump minimum WordPress version.

= 1.5.2 =
* Make permissions more filterable.

= 1.5.1 =
* Fix a PHP error on the dashboard.

= 1.5.0 =
* Updated to Mark's 2016 plugin framework for easier maintenance.

= 1.4.1 =
* More complete French translation.

= 1.4 =
* Added a Hebrew translation.

= 1.3 =
* Make the `wp_list_pages()` call filterable.
* Added Serbian, Turkish, and Japanese translations.
* Use a Dashicon for WordPress 3.8+.
* RTL CSS styles.

= 1.2 =
* New or updated translations for Gujarati, Norwegian, and Brazilian Portuguese.
* CSS fixes for WordPress 3.5.
* More robust AJAX saving when save events overlap.

= 1.1 =
* Feature: drag and drop reordering of the documents list.
* Feature: local /wp-admin/ links are rewritten when shared through the API so that they're wp-admin-relative and thus work on the destination site.
* Improvement: more consistent cap checks, so plugins can consistently customize who can do what.
* Improvement: restore settings form to previous state when "cancel" is clicked.
* Bug fix: sort order is now synced.

= 1.0 =
* Feature: sync help documents from another WP Help install.
* Feature: rename the page title.
* Feature: rename the document list title.
* Feature: choose the location of the menu item (Dashboard submenu, or one of three top level positions).
* Feature: easier access to creation, editing, and management of documents.
* Feature: dashboard widget.
* Improvement: better UI for selecting the default document.

= 0.3 =
* Translation for: French. Squashes a PHP Notice. Add an action hook so people can add their own styles.

= 0.2 =
* Translations for: Bulgarian, German, Spanish, Mexican Spanish, Macedonian, Dutch, Brazilian Portuguese, and Russian.

= 0.1 =
* Initial version
4 changes: 2 additions & 2 deletions wp-help.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/*
Plugin Name: WP Help
Description: Administrators can create detailed, hierarchical documentation for the site's authors and editors, viewable in the WordPress admin.
Version: 1.7.1
Version: 1.7.2
License: GPL
Plugin URI: http://txfx.net/wordpress-plugins/wp-help/
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/

/**
* Copyright (c) 2011-2021 Mark Jaquith (email: mark@jaquith.me)
* Copyright (c) 2011-2023 Mark Jaquith (email: mark@jaquith.me)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
Expand Down

0 comments on commit 6781e8e

Please sign in to comment.