https://github.com/jazzsequence/action-validate-plugin-version
A GitHub action that validates the last tested plugin version against the current version of WordPress.
https://github.com/jazzsequence/action-validate-plugin-version
github-actions hacktoberfest wordpress wordpress-plugin
Last synced: about 1 month ago
JSON representation
A GitHub action that validates the last tested plugin version against the current version of WordPress.
- Host: GitHub
- URL: https://github.com/jazzsequence/action-validate-plugin-version
- Owner: jazzsequence
- License: mit
- Created: 2024-10-15T04:09:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-19T16:14:10.000Z (3 months ago)
- Last Synced: 2025-12-22T06:46:15.384Z (3 months ago)
- Topics: github-actions, hacktoberfest, wordpress, wordpress-plugin
- Language: Shell
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Validate WordPress Plugin "Tested Up To" Version
[](https://github.com/jazzsequence/action-validate-plugin-version/blob/main/LICENSE)
[](https://github.com/jazzsequence/action-validate-plugin-version/actions/workflows/test.yml)
A GitHub action that validates the last tested plugin version against the current version of WordPress.
## Usage
```yaml
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
with:
fetch-depth: 0
- name: Validate Plugin Version
uses: jazzsequence/action-validate-plugin-version@v2
with:
plugin-path: 'path/to/plugin-slug/'
filenames: 'readme.txt,README.MD'
branch: 'main'
```
### Configuration
Your `actions/checkout` action **must include** `fetch-depth`. `fetch-depth: 0` ensures that all branches are pulled which is _necessary_ for ensuring that the _correct branch_ is used to create the pull request against.
### Inputs
#### `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 branch the workflow is running on (default branch for cron-triggered workflows).
#### `pr-status`
The status to set on the PR. If not specified, the action will create a _draft_ PR. Accepts `draft` or `open`.
#### `validation-level`
The validation level to use. Accepts `patch` or `minor`. If not specified, the action will use `minor`.
- `minor`: Compares the "Tested Up To" version against the current WordPress version using only the major and minor numbers (e.g., `6.1`), ignoring the patch number.
- `patch`: Compares the full version including the patch number (e.g., `6.1.2`), requiring an exact match for validation.
## Permissions
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.