Skip to content

Commit 2fe9cb9

Browse files
committed
Update README.md
1 parent dd637e7 commit 2fe9cb9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Deploy your plugin to the WordPress.org repository using GitHub Actions.
44
5-
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/releases/latest) [![MIT License](https://img.shields.io/github/license/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/blob/develop/LICENSE)
5+
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/releases/latest) [![MIT License](https://img.shields.io/github/license/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/blob/develop/LICENSE) [![Automated Tests](https://github.com/10up/action-wordpress-plugin-deploy/actions/workflows/test.yml/badge.svg)](https://github.com/10up/action-wordpress-plugin-deploy/actions/workflows/test.yml)
66

77
This Action commits the contents of your Git tag to the WordPress.org plugin repository using the same tag name. It can exclude files as defined in either `.distignore` or `.gitattributes`, and moves anything from a `.wordpress-org` subdirectory to the top-level `assets` directory in Subversion (plugin banners, icons, and screenshots).
88

@@ -13,25 +13,30 @@ This Action commits the contents of your Git tag to the WordPress.org plugin rep
1313
## Configuration
1414

1515
### Required secrets
16+
1617
* `SVN_USERNAME`
1718
* `SVN_PASSWORD`
1819

1920
[Secrets are set in your repository settings](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets). They cannot be viewed once stored.
2021

2122
### Optional environment variables
23+
2224
* `SLUG` - Defaults to the repository name. This is customizable in case your WordPress repository has a different slug or is capitalized differently.
2325
* `VERSION` - Defaults to the tag name. We do not recommend setting this except for testing purposes.
2426
* `ASSETS_DIR` - Defaults to `.wordpress-org`. This is customizable for other locations of WordPress.org plugin repository-specific assets that belong in the top-level `assets` directory (the one on the same level as `trunk`).
2527
* `BUILD_DIR` - Defaults to `false`. Set this flag to the directory where you build your plugins files into, then the action will copy and deploy files from that directory. Both absolute and relative paths are supported. The relative path if provided will be concatenated with the repository root directory. All files and folders in the build directory will be deployed, `.disignore` or `.gitattributes` will be ignored.
2628

2729
### Inputs
30+
2831
* `generate-zip` - Defaults to `false`. Generate a ZIP file from the SVN `trunk` directory. Outputs a `zip-path` variable for use in further workflow steps.
2932
* `dry-run` - Defaults to `false`. Set this to `true` if you want to skip the final Subversion commit step (e.g., to debug prior to a non-dry-run commit).
3033

3134
### Outputs
35+
3236
* `zip-path` - The path to the ZIP file generated if `generate-zip` is set to `true`. Fully qualified including the filename, intended for use in further workflow steps such as uploading release assets.
3337

3438
## Excluding files from deployment
39+
3540
If there are files or directories to be excluded from deployment, such as tests or editor config files, they can be specified in either a `.distignore` file or a `.gitattributes` file using the `export-ignore` directive. If a `.distignore` file is present, it will be used; if not, the Action will look for a `.gitattributes` file and barring that, will write a basic temporary `.gitattributes` into place before proceeding so that no Git/GitHub-specific files are included.
3641

3742
`.distignore` is useful particularly when there are built files that are in `.gitignore`, and is a file that is used in [WP-CLI](https://wp-cli.org/). For modern plugin setups with a build step and no built files committed to the repository, this is the way forward. `.gitattributes` is useful for plugins that don't run a build step as a part of the Actions workflow and also allows for GitHub's generated ZIP files to contain the same contents as what is committed to WordPress.org. If you would like to attach a ZIP file with the proper contents that decompresses to a folder name without version number as WordPress generally expects, you can add steps to your workflow that generate the ZIP and attach it to the GitHub release (concrete examples to come).
@@ -64,7 +69,6 @@ If there are files or directories to be excluded from deployment, such as tests
6469
/.gitignore export-ignore
6570
```
6671

67-
6872
## Example Workflow Files
6973

7074
To get started, you will want to copy the contents of one of these examples into `.github/workflows/deploy.yml` and push that to your repository. You are welcome to name the file something else, but it must be in that directory. The usage of `ubuntu-latest` is recommended for compatibility with required dependencies in this Action.
@@ -96,6 +100,7 @@ jobs:
96100
```
97101
98102
### Deploy on publishing a new release and attach a ZIP file to the release
103+
99104
```yml
100105
name: Deploy to WordPress.org
101106
on:
@@ -132,6 +137,7 @@ jobs:
132137
```
133138
134139
## Contributing
140+
135141
Want to help? Check out our [contributing guidelines](CONTRIBUTING.md) to get started.
136142
137143
## License

0 commit comments

Comments
 (0)