Skip to content

Commit 70aab29

Browse files
author
John Spellman
committed
[CMS-1033] Add GH action for deployments to wp.org (#219)
* Cleanup distignore, add GH action * Add assets * Add CONTRIBUTING.md, update readmes
1 parent e6c52a0 commit 70aab29

File tree

9 files changed

+61
-53
lines changed

9 files changed

+61
-53
lines changed

.distignore

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,27 @@
11
# A set of files you probably don't want in your WordPress.org distribution
2-
.babelrc
3-
.deployignore
2+
.circleci
43
.distignore
54
.editorconfig
6-
.eslintignore
7-
.eslintrc
85
.git
6+
.github
97
.gitignore
10-
.gitlab-ci.yml
11-
.travis.yml
128
.DS_Store
139
Thumbs.db
14-
behat.yml
15-
bitbucket-pipelines.yml
1610
bin
17-
.circleci/config.yml
11+
behat.yml
12+
CODEOWNERS
1813
composer.json
1914
composer.lock
20-
dependencies.yml
15+
CONTRIBUTING.md
2116
Gruntfile.js
2217
package.json
2318
package-lock.json
24-
phpunit.xml
25-
phpunit.xml.dist
26-
multisite.xml
27-
multisite.xml.dist
28-
.phpcs.xml
29-
phpcs.xml
30-
.phpcs.xml.dist
3119
phpcs.xml.dist
20+
phpunit.xml.dist
3221
README.md
33-
webpack.config.js
34-
wp-cli.local.yml
35-
yarn.lock
3622
tests
3723
vendor
3824
node_modules
3925
*.sql
4026
*.tar.gz
41-
*.zip
27+
*.zip
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release wp-native-php-sessions plugin to wp.org
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: WordPress Plugin Deploy
11+
uses: 10up/action-wordpress-plugin-deploy@2.1.1
12+
env:
13+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
14+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
15+
SLUG: ${{ env.SLUG }}

.wordpress-org/banner-1544x500.png

83.4 KB
Loading

.wordpress-org/banner-772x250.png

37.1 KB
Loading

.wordpress-org/icon-128x128.png

7.3 KB
Loading

.wordpress-org/icon-256x256.png

16.7 KB
Loading

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing
2+
3+
The best way to contribute to the development of this plugin is by participating on the GitHub project:
4+
5+
https://github.com/pantheon-systems/wp-native-php-sessions
6+
7+
Pull requests and issues are welcome!
8+
9+
## Testing
10+
11+
You may notice there are two sets of tests running, on two different services:
12+
13+
* The [PHPUnit](https://phpunit.de/) test suite.
14+
* The [Behat](http://behat.org/) test suite runs against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.
15+
16+
Both of these test suites can be run locally, with a varying amount of setup.
17+
18+
PHPUnit requires the [WordPress PHPUnit test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/), and access to a database with name `wordpress_test`. If you haven't already configured the test suite locally, you can run `bash bin/install-wp-tests.sh wordpress_test root '' localhost`.
19+
20+
Behat requires a Pantheon site. Once you've created the site, you'll need [install Terminus](https://github.com/pantheon-systems/terminus#installation), and set the `TERMINUS_TOKEN`, `TERMINUS_SITE`, and `TERMINUS_ENV` environment variables. Then, you can run `./bin/behat-prepare.sh` to prepare the site for the test suite.
21+
22+
## Workflow
23+
24+
The `develop` branch is the development branch which means it contains the next version to be released. `main` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`.
25+
26+
## Release Process
27+
28+
1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes.
29+
1. Update plugin version in `package.json`, `README.md`, `readme.txt`, and `wp-native-php-sessions.php`.
30+
1. Update the Changelog with the latest changes.
31+
1. Create a PR against the `main` branch.
32+
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `main`.
33+
1. Pull `main` locally, create a new tag, and push up.
34+
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired.
35+
1. Create a [new release](https://github.com/pantheon-systems/wp-native-php-sessions/releases/new) using the tag created in the previous steps, naming the release with the new version number, and targeting the tag created in the previous step. Paste the release changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues if applicable.
36+
1. Wait for the [_Release wp-native-php-sessions plugin to wp.org_ action](https://github.com/pantheon-systems/wp-native-php-sessions/actions/workflows/wordpress-plugin-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
37+
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/wp-native-php-sessions/. This may take a few minutes.

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,7 @@ That's it!
3232

3333
## Contributing ##
3434

35-
The best way to contribute to the development of this plugin is by participating on the GitHub project:
36-
37-
https://github.com/pantheon-systems/wp-native-php-sessions
38-
39-
Pull requests and issues are welcome!
40-
41-
You may notice there are two sets of tests running, on two different services:
42-
43-
* Travis CI runs the [PHPUnit](https://phpunit.de/) test suite.
44-
* Circle CI runs the [Behat](http://behat.org/) test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.
45-
46-
Both of these test suites can be run locally, with a varying amount of setup.
47-
48-
PHPUnit requires the [WordPress PHPUnit test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/), and access to a database with name `wordpress_test`. If you haven't already configured the test suite locally, you can run `bash bin/install-wp-tests.sh wordpress_test root '' localhost`.
49-
50-
Behat requires a Pantheon site. Once you've created the site, you'll need [install Terminus](https://github.com/pantheon-systems/terminus#installation), and set the `TERMINUS_TOKEN`, `TERMINUS_SITE`, and `TERMINUS_ENV` environment variables. Then, you can run `./bin/behat-prepare.sh` to prepare the site for the test suite.
35+
See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-native-php-sessions/blob/main/CONTRIBUTING.md) for information on contributing.
5136

5237
## Frequently Asked Questions ##
5338

readme.txt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,7 @@ That's it!
3131

3232
== Contributing ==
3333

34-
The best way to contribute to the development of this plugin is by participating on the GitHub project:
35-
36-
https://github.com/pantheon-systems/wp-native-php-sessions
37-
38-
Pull requests and issues are welcome!
39-
40-
You may notice there are two sets of tests running, on two different services:
41-
42-
* Travis CI runs the [PHPUnit](https://phpunit.de/) test suite.
43-
* Circle CI runs the [Behat](http://behat.org/) test suite against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform.
44-
45-
Both of these test suites can be run locally, with a varying amount of setup.
46-
47-
PHPUnit requires the [WordPress PHPUnit test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/), and access to a database with name `wordpress_test`. If you haven't already configured the test suite locally, you can run `bash bin/install-wp-tests.sh wordpress_test root '' localhost`.
48-
49-
Behat requires a Pantheon site. Once you've created the site, you'll need [install Terminus](https://github.com/pantheon-systems/terminus#installation), and set the `TERMINUS_TOKEN`, `TERMINUS_SITE`, and `TERMINUS_ENV` environment variables. Then, you can run `./bin/behat-prepare.sh` to prepare the site for the test suite.
34+
See [CONTRIBUTING.md](https://github.com/pantheon-systems/wp-native-php-sessions/blob/main/CONTRIBUTING.md) for information on contributing.
5035

5136
== Frequently Asked Questions ==
5237

0 commit comments

Comments
 (0)