-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
17 additions
and
119 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,5 @@ | ||
# WordPress.org Plugin Assets Update | ||
|
||
This Action commits any `readme.txt` and WordPress.org-specific assets changes in your specified branch to the WordPress.org plugin repository if no other changes have been made since the last deployment to WordPress.org. This is useful for updating things like screenshots or `Tested up to` separately from functional changes, provided your Git branching methodology avoids changing anything else in the specified branch between functional releases. It is **highly recommended** that you use a stable branch where you only merge readme/asset commits in between larger functional merges that only occur when preparing for a release (often implemented as `master` vs. `develop`). | ||
|
||
Because the WordPress.org plugin repository shows information from `readme.txt` in the specified `Stable tag`, this Action also attempts to parse out the stable tag from `readme.txt` and deploy to there as well as `trunk`. If your stable tag is `trunk` or a tag that does not exist in the `tags` subfolder, it will skip that part of the update and only update `trunk` and/or `assets`. | ||
|
||
**Important note:** If your development process leads to a situation where `master` (or other specified branch) only contains changes to `readme.txt` or `assets` since the last sync to the plugin directory and those changes are in preparation for the next release, those changes will go live and potentially be misleading to users. Usage of this Action assumes a fairly traditional Git methodology that involves merging all changes to `master` when functional changes are ready and that this seemingly unlikely situation will therefore not happen in your repo; there are no safeguards against syncing changes based on readme/asset content, as that cannot be predicted. | ||
|
||
## Configuration | ||
|
||
### Required secrets | ||
* `SVN_USERNAME` | ||
* `SVN_PASSWORD` | ||
|
||
Secrets can be set while editing your workflow or in the repository settings. They cannot be viewed once stored. [GitHub secrets documentation](https://developer.github.com/actions/creating-workflows/storing-secrets/) | ||
|
||
### Optional environment variables | ||
* `SLUG` - defaults to the respository name, customizable in case your WordPress repository has a different slug. This should be a very rare case as WordPress assumes that the directory and initial plugin file have the same slug. | ||
* `ASSETS_DIR` - defaults to `.wordpress-org`, 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`) | ||
|
||
### Known issues | ||
* It would be more efficient to additionally use the `paths` filter for the `push` action to reduce the number of runs. So far in testing it is possible to limit it to pushes that include readme/asset files as specified, but not ones that *only* include those files. The Action itself still needs to run as written because it compares the totality of changes in the branch against what's in SVN and not just the contents of the current push. | ||
|
||
## Example Workflow File | ||
``` | ||
name: Plugin asset/readme update | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
master: | ||
name: Push to master | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: WordPress.org plugin asset/readme update | ||
uses: 10up/actions-wordpress/dotorg-plugin-asset-update@master | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
``` | ||
|
||
## Contributing | ||
Want to help? Check out our [contributing guidelines](../CONTRIBUTING.md) to get started. | ||
|
||
<p align="center"> | ||
<a href="http://10up.com/contact/"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a> | ||
</p> | ||
|
||
## License | ||
|
||
Our GitHub Actions are available for use and remix under the MIT license. | ||
## Moved to https://github.com/10up/action-wordpress-plugin-asset-update | ||
|
||
The Action will continue to work as-is in your workflow files; however, we recommend migrating to the new repo for future updates. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,5 @@ | ||
# WordPress.org Plugin Deploy | ||
|
||
This Action commits the contents of your Git tag to the WordPress.org plugin repository using the same tag name. It excludes files in `.git` and `.github` subdirectories and moves anything from a `.wordpress-org` subdirectory to the top-level `assets` directory in Subversion (plugin banners, icons, and screenshots). | ||
|
||
## Configuration | ||
|
||
### Required secrets | ||
* `SVN_USERNAME` | ||
* `SVN_PASSWORD` | ||
* `GITHUB_TOKEN` - you do not need to generate one but you do have to explicitly make it available to the Action | ||
|
||
Secrets can be set while editing your workflow or in the repository settings. They cannot be viewed once stored. [GitHub secrets documentation](https://developer.github.com/actions/creating-workflows/storing-secrets/) | ||
|
||
### Optional environment variables | ||
* `SLUG` - defaults to the respository name, customizable in case your WordPress repository has a different slug. This should be a very rare case as WordPress assumes that the directory and initial plugin file have the same slug. | ||
* `VERSION` - defaults to the tag name; do not recommend setting this except for testing purposes | ||
* `ASSETS_DIR` - defaults to `.wordpress-org`, 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`) | ||
|
||
### Known issues | ||
* Currently the `tags` filter on the `push` action does not seem to work correctly, so we target the `refs/tags/*` naming of a branch instead. Ideally for readability and correctness this would use something like `tags: - *`. | ||
|
||
## Example Workflow File | ||
``` | ||
name: Deploy to WordPress.org | ||
on: | ||
push: | ||
branches: | ||
- refs/tags/* | ||
jobs: | ||
tag: | ||
name: New tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: WordPress Plugin Deploy | ||
uses: 10up/actions-wordpress/dotorg-plugin-deploy@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SLUG: my-super-cool-plugin | ||
``` | ||
|
||
## Contributing | ||
Want to help? Check out our [contributing guidelines](../CONTRIBUTING.md) to get started. | ||
|
||
<p align="center"> | ||
<a href="http://10up.com/contact/"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a> | ||
</p> | ||
|
||
## License | ||
|
||
Our GitHub Actions are available for use and remix under the MIT license. | ||
## Moved to https://github.com/10up/action-wordpress-plugin-deploy | ||
|
||
The Action will continue to work as-is in your workflow files; however, we recommend migrating to the new repo for future updates. |
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