Skip to content

Replace asset update with WordPress.org plugin page workflow - #3

Open
InpsydeNiklas wants to merge 1 commit into
dev/mainfrom
ci/wordpress-org-plugin-page
Open

InpsydeNiklas wants to merge 1 commit into
dev/mainfrom
ci/wordpress-org-plugin-page

Conversation

@InpsydeNiklas

Copy link
Copy Markdown
Owner

This replaces assets-update.yml (the 10up asset update on every push to main) with a manual WordPress.org plugin page workflow, built on wordpress-org-plugin-page.yml from inpsyde/reusable-workflows.

Behavior change: nothing is published automatically any more. Readme and asset changes reach WordPress.org only when someone runs the workflow from dev/main, and the readme is synced only when SYNC_README is on.

What changes

  • Manual only, from dev/main only. The workflow is workflow_dispatch only, and the job is skipped on any other ref, so a feature branch can't reach the plugin page.

  • Inputs: SYNC_README, SYNC_ASSETS and DRY_RUN, all default true. A dry run is the default. It shows the SVN status and the readme diff against the Stable tag, and uploads exactly what would be committed.

  • Asset validation before syncing:

    • lowercase names
    • banner and icon dimensions
    • size limits
    • blueprints/*.json
    • no LFS files

    Then .wordpress-org/ is mirrored to SVN /assets, so files removed from Git are removed from WordPress.org too.

  • GIT_REF is the dispatched commit (github.sha), never free text. The token is read-only.

  • The concurrency group wordpress-org-svn is shared with releases.

  • CONTRIBUTING.md documents the flow: merge to dev/main, dry run, review, then run with DRY_RUN off.

Release Confirmation is not enabled for multisyde, so syncing the readme into the stable tag is supported.

Tested

On a local Gitea, against the real WordPress.org SVN with dummy credentials:

  • the dry run is a no-op on the current tree
  • each sync switch touches only its own part
  • both switches off fails
  • an uppercase asset name fails validation
  • a blueprint is validated and listed
  • DRY_RUN=false fails at the SVN commit with an authentication error
  • pushes never start the workflow

Only verifiable here on GitHub: the boolean inputs reaching the called workflow. A Gitea bug passes them through workflow_call as false, so locally the logic was tested by running a copy of the reusable workflow directly.

Depends on inpsyde/reusable-workflows#296. The pin points at that PR's head until it's merged, and is switched to @main before this PR is opened.

The old assets-update workflow pushed readme.txt and .wordpress-org/
to WordPress.org on every push to main. With main becoming the built
branch, that trigger no longer fits, and publishing should be a
deliberate step anyway.

The new workflow calls the inpsyde wordpress-org-plugin-page reusable
workflow and only runs when dispatched manually. A dry run is the
default, so a run only previews the SVN changes and the readme diff
until DRY_RUN is turned off. The assets are validated (names,
dimensions, sizes, blueprints) before anything is synced, and
.wordpress-org/ is mirrored to SVN /assets. The readme is synced to
the Stable tag and trunk only when SYNC_README is on. GIT_REF is the
dispatched commit, never free text.

The reusable workflow is pinned to the head of
inpsyde/reusable-workflows#296 until that PR is merged.
@github-actions

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
1 0 1

⚠️ Warnings (1)

📁 modules/SiteActivePlugins/Feature.php (1 warning)
📍 Line 🔖 Check 💬 Message
169 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::FILTER_MAX_SITES".

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant