Update your plugin readme and assets in the WordPress.org repository outside of new releases
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
GH Actions Workflow Sync Bot b4b14328a5
💬 #81 - Workflow File Updated / Triggered By varunsridharan/.workflows@cd6eb3b7e98c68e317bb4c3bbfd7a81c8a6a1c81
4 years ago
.github/workflows 💬 #81 - Workflow File Updated / Triggered By varunsridharan/.workflows@cd6eb3b7e98c68e317bb4c3bbfd7a81c8a6a1c81 4 years ago
Dockerfile first commit. 5 years ago
LICENSE first commit. 5 years ago
README.md first commit. 5 years ago
action.yml Updated Base. 4 years ago
entrypoint.sh Fixed. /entrypoint.sh: line 60: syntax error near unexpected token `fi' 4 years ago

README.md

⚠️ Note: To use this GitHub Action, you must have access to GitHub Actions. GitHub Actions are currently only available in public beta. You can apply for Github Actions beta access here.

WordPress.org Plugin Readme/Assets Update - Github Action

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.

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

Configuration

Required secrets

  • WORDPRESS_USERNAME
  • WORDPRESS_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

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)
  • IGNORE_FILE - defaults to .wporgignore, customizable for other locations of list of files to be ignore like .gitignore
  • ASSETS_IGNORE_FILE - defaults to .wporgassetsignore, customizable for other locations of list of files to be ignore like .gitignore

Excluding files from deployment

If there are files or directories to be excluded from deployment, such as tests or editor config files, they can be specified in your .wporgignore file. If you use this method, please be sure to include the following items:

# Directories
.wordpress-org
.github

# Files
/.gitattributes
/.gitignore

⚠️ Note: You Should Provide Github Token. If Not No Updated File Will Be Committed & Pushed

Example Workflow File

name: Update WordPress.org
on:
  push:
    branches:
    - master
jobs:
  tag:
    name: Push To Readme OR WPAssets
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: WordPress.org plugin asset/readme update
      uses: varunsridharan/action-wp-org-assets-update@master
      with:
        WORDPRESS_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }}
        WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}
        SLUG: my-super-cool-plugin
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Credits

This Github Action Bootstrapped From


Change Log

1.0 - 06/09/2019

  • First Release

Contribute

If you would like to help, please take a look at the list of issues or the To Do checklist.

License

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

2017 - 2018 Varun Sridharan, varunsridharan.in

If you find it useful, let me know 😉

You can contact me on Twitter or through my email.

Backed By

DigitalOcean JetBrains Tidio Chat