Skip to content
upload-cloud

GitHub Action

WordPress Plugin Readme Update

1.3.0 Latest version
Use latest version
upload-cloud

WordPress Plugin Readme Update

Deploy readme and asset updates to the WordPress Plugin Repository

Installation

Copy and paste the following snippet into your .yml file.

- name: WordPress Plugin Readme Update
  uses: 10up/action-wordpress-plugin-asset-update@1.3.0
Learn more about this action in 10up/action-wordpress-plugin-asset-update
Choose a version

WordPress.org Plugin Readme/Assets Update

This Action commits any readme 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 the readme in the specified Stable tag, this Action also attempts to parse out the stable tag from your readme 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 the readme or assets directory 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.

☞ This Action is meant to be used in tandem with our WordPress.org Plugin Deploy Action

Configuration

Required secrets

  • SVN_USERNAME
  • SVN_PASSWORD

Secrets are set in your repository settings. They cannot be viewed once stored.

Optional environment variables

  • SLUG - defaults to the respository name, customizable in case your WordPress repository has a different slug or is capitalized differently.
  • 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).
  • README_NAME - defaults to readme.txt, customizable in case you use README.md instead, which is now quietly supported in the WordPress.org plugin repository.

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/action-wordpress-plugin-asset-update@master
      env:
        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

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.

Contributing

Want to help? Check out our contributing guidelines to get started.

License

Our GitHub Actions are available for use and remix under the MIT license.

☞ Check out our collection of WordPress-focused GitHub Actions

You can’t perform that action at this time.