A GitHub action that validates the last tested plugin version against the current version of WordPress.
name: Validate Plugin Version
on:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Plugin Version
uses: jazzsequence/action-validate-plugin-version@v1
with:
plugin-path: 'path/to/plugin-slug/'
filenames: 'readme.txt,README.MD'
branch: 'main'
plugin-path
The path to the plugin directory to validate. If not specified, the action will use the project root.
dry-run
Only used in self-testing. If passed, this will not actually create a PR against the repository.
gh-token
The GitHub token to use for creating a PR. If not specified, the action will use the default GitHub token.
filenames
A comma-separated list of filenames to check for the "Tested Up To" version. If not specified, the action will use readme.txt
and README.md
.
branch
The branch to create the PR against. If not specified, the action will use the main
branch.
The write
permissions on contents
and pull-requests
are important. They are required for the action to commit the changes back to the repository and open a pull request. The only files affected by the action are files named readme.txt
, README.md
or those files matching the pattern (looking for "Tested Up To" in the file) that have been specified in the filenames
input.