-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CMS-1033] Add GH action for deployments to wp.org (#368)
- Loading branch information
John Spellman
authored
Nov 29, 2022
1 parent
e825bc9
commit 8ee17a0
Showing
13 changed files
with
86 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Directories | ||
/.circleci export-ignore | ||
/.git export-ignore | ||
/.github export-ignore | ||
/.wordpress-org export-ignore | ||
/tests export-ignore | ||
/node_modules export-ignore | ||
/vendor export-ignore | ||
/bin export-ignore | ||
|
||
# Files | ||
/.DS_Store export-ignore | ||
/Thumbs.db export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/behat.yml export-ignore | ||
/CODEOWNERS export-ignore | ||
/composer.json export-ignore | ||
/composer.lock export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/Gruntfile.js export-ignore | ||
/package-lock.json export-ignore | ||
/package.json export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/README.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Release wp-redis plugin to wp.org | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: WordPress Plugin Deploy | ||
uses: 10up/[email protected] | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SLUG: ${{ env.SLUG }} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Contributing ## | ||
|
||
The best way to contribute to the development of this plugin is by participating on the GitHub project: | ||
|
||
https://github.com/pantheon-systems/wp-redis | ||
|
||
Pull requests and issues are welcome! | ||
|
||
## Workflow | ||
|
||
The `develop` branch is the development branch which means it contains the next version to be released. `master` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`. | ||
|
||
## Testing | ||
|
||
You may notice there are two sets of tests running, on two different services: | ||
|
||
* The [PHPUnit](https://phpunit.de/) test suite. | ||
* The [Behat](http://behat.org/) test suite runs against a Pantheon site, to ensure the plugin's compatibility with the Pantheon platform. | ||
|
||
Both of these test suites can be run locally, with a varying amount of setup. | ||
|
||
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`. You'll also need to enable Redis and the PHPRedis extension in order to run the test suite against Redis. | ||
|
||
Behat requires a Pantheon site with Redis enabled. 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. | ||
|
||
## Release Process | ||
|
||
1. Starting from `develop`, cut a release branch named `release_X.Y.Z` containing your changes. | ||
1. Update plugin version in `package.json`, `README.md`, `readme.txt`, and `wp-redis.php`. | ||
1. Update the Changelog with the latest changes. | ||
1. Create a PR against the `master` branch. | ||
1. After all tests pass and you have received approval from a CODEOWNER (including resolving any merge conflicts), merge the PR into `master`. | ||
1. Pull `master` locally, create a new tag, and push up. | ||
1. Confirm that the necessary assets are present in the newly created tag, and test on a WP install if desired. | ||
1. Create a [new release](https://github.com/pantheon-systems/wp-redis/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 the `Changelog` section of the `README` into the body of the release and include a link to the closed issues if applicable. | ||
1. Wait for the [_Release wp-redis plugin to wp.org_ action](https://github.com/pantheon-systems/wp-redis/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. | ||
1. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/wp-redis/. This may take a few minutes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters