Skip to content
corner-right-up

GitHub Action

WordPress "Tested up to" Updater Action

v1.2.0 Latest version

WordPress "Tested up to" Updater Action

corner-right-up

WordPress "Tested up to" Updater Action

Automatically updates the "Tested up to" strings in WordPress plugin files based on the latest versions of WordPress

Installation

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

              

- name: WordPress "Tested up to" Updater Action

uses: AlecRust/[email protected]

Learn more about this action in AlecRust/wp-tut-updater-action

Choose a version

WordPress "Tested up to" Updater Lint CI CodeQL

Automate "Tested up to" version updates in your WordPress projects.

This GitHub Action fetches the latest WordPress version then updates the "Tested up to" version of your WordPress plugin or theme if it's out of date.

The action can create a pull request for the change, or commit directly to the default branch. Never forget to update the "Tested up to" version of your WordPress plugin or theme again!

Example

Here's a minimal example of running the action based on a cron schedule.

.github/workflows/tut-check.yml:

on:
  schedule:
    - cron: '0 0 * * 0'
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  update-tested-up-to:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Update "Tested up to" version
        uses: AlecRust/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Note: permissions, env.GITHUB_TOKEN and the "Allow GitHub Actions to create and approve pull requests" repository option are required for the action to create pull requests.

Usage

See action.yml for detailed information on the action's inputs.

- uses: AlecRust/[email protected]
  with:
    # Paths to update (optional, default: readme.txt)
    file-paths: |
      readme.txt
      src/other-file.php
    # Create a pull request, or commit directly if disabled (optional, default: true)
    create-pr: true
    # Git author (optional, default: github-actions <[email protected]>)
    git-author: 'Joe Bloggs <[email protected]>'

Please remember to thoroughly test your plugin/theme with the new version of WordPress before publishing an updated "Tested up to" version.

License

The scripts and documentation in this project are released under the MIT License