@@ -40,8 +40,9 @@ Set the following environment variables in the GitLab project's configuration:
*`PLUGIN_SLUG` - plugin's name on WordPress.org
*`PLUGIN_VERSION` - version to tag
*`WP_ORG_RELEASE_REF` - git commit ref (branch or tag) to use for release
*`WP_ORG_ASSETS_DIR` - directory name, relative to repo root, where screenshots and other static assets are held
### Alternatives
### Alternate loading method
A [loader script](./scripts/loader.sh) is available as an alternative to downloading the deploy script during the `before_script` stage.
...
...
@@ -56,6 +57,15 @@ A sample is provided in [examples/gitattributes](./examples/gitattributes). If u
/.gitattributes export-ignore
```
## Deploying assets for WordPress.org
WordPress.org's plugins directory allows plugins to provide various static assets, which are not bundled in the downloadable plugin, rather only being used to enhance the visitor experience when browsing plugins. More details can be found at [https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/](https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/).
As the SVN `assets` directory exists outside of the directories used for plugin files, the handling of static assets in git requires a small bit of setup:
1. In the repository root, create a directory named `.wordpress-org`; alternatively, specify a custom path using the `WP_ORG_ASSETS_DIR` environment variable.
1. Commit to the `WP_ORG_ASSETS_DIR` directory in git any screenshots or other static assets that should be added to the plugin's `assets` directory in SVN.
## Protecting deploys
Choose a `WP_ORG_RELEASE_REF` value that starts with a consistent prefix. Doing so allows that prefix to be protected using GitLab's "Protected Branches" or "Protected Tags" features.