bash scripts/build.sh is the only supported way to produce the distributable. The release workflow, Plugin Check, and a local developer all run that script.
Build the zip
Prerequisites on PATH: npm, composer, zip, rsync, php. If node_modules is missing, the script runs npm ci.
-
Build JavaScript
npm run buildwritesbuild/admin.jsandbuild/admin.asset.php. -
Install runtime Composer dependencies
composer install --no-dev --optimize-autoloader. Outside CI the script restores development dependencies at the end. -
Copy the allow-list
rsync each item through
.distignoreintobuild/plugin-scaffold/. -
Assert required and forbidden paths
Missing runtime files fail the build.
node_modules,.npmrc,auth.json,.git,src,tests, andoverlaysmust not appear in the output. -
Compare versions and zip
The plugin header Version must match
.release-please-manifest.json. Thenbuild/plugin-scaffold.zipis created.
bash scripts/build.shCopy list
scripts/build.sh copy_list
-
plugin-scaffold.phpstring required -
Main plugin file. Also required in the output.
-
uninstall.phpstring required -
Uninstall file. Also required in the output.
-
includesstring required -
PHP classes. Bootstrap.php is required in the output.
-
languagesstring -
Text domain path. Present as languages/index.php.
-
vendorstring required -
Runtime autoloader. vendor/autoload.php is required.
-
composer.jsonstring -
Copied into the zip. composer.lock is in .distignore.
-
LICENSEstring -
GPL-2.0 text.
-
README.mdstring -
Copied into the zip.
No fields match this filter.
Optional extras the script copies when present:
- Root
build/into the packagebuild/(excluding the package directory and zip) readme.txt(WordPress.org overlay), with release-please marker lines strippedblocks/buildintoblocks/build(blocks overlay)
Required files after copy: plugin-scaffold.php, uninstall.php, includes/Core/Bootstrap.php, vendor/autoload.php, build/admin.js, build/admin.asset.php. The packaged autoloader must resolve Linchpin\Plugin_Scaffold\Core\Bootstrap.
.distignore is the second exclusion layer. It lists development paths including /src, /tests, /docs, /overlays, and /scripts.
Release
release-please-config.json uses release-type: php for the . package named plugin-scaffold. Extra files that receive the version: plugin-scaffold.php, README.md, .release-please-manifest.json, and package.json $.version. Tags include v and do not include the component name.
.github/workflows/release-please.yml on main:
googleapis/release-please-action@v5withsecrets.GH_BOT_TOKEN- On
release_created, run Plugin Check - On success, run
bash scripts/build.shand attachbuild/plugin-scaffold.zipto the tag asplugin-scaffold.zip
Current manifest version: 0.1.0. CHANGELOG.md records that as the initial house standard.