Skip to content

feat(release): release Composer packages separately - #97

Open
Adi-ty wants to merge 1 commit into
v1.0.0/task/npm-publishfrom
feat/release-php-per-package-tags
Open

Adi-ty wants to merge 1 commit into
v1.0.0/task/npm-publishfrom
feat/release-php-per-package-tags

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Releases each Composer package on its own tag, so wp-phpstan can go to 2.0.0 without wp-phpcs getting an empty 2.0.0. Until now any v* tag split and tagged both mirrors at the same version.

Closes

N/A

Changes

  • release-php.yml triggers on rtcamp/<package>@<version> tags (for example rtcamp/wp-phpstan@2.0.0). It splits only that package and tags its mirror v<version>, so Packagist sees the same tag format as before. The other mirror is not touched.
  • The tag must match a splitsh.json subtree and the package's composer.json name, or the run fails before pushing anything. A bare v* tag no longer triggers a release.
  • workflow_dispatch takes the same tag form in test_tag (default rtcamp/wp-phpstan@0.0.0-test), so a smoke test or resync_branch run acts on one mirror.
  • AGENTS.md, the split-npm-packages.yml header and the monorepo-builder.php comment now describe per-package tags.

How I verified

'rtcamp/wp-phpstan@2.0.0'      OK  tag=v2.0.0       ["wp-phpstan:composer-packages/phpstan:SPLIT_KEY_PHPSTAN"]
'rtcamp/wp-phpcs@1.1.0'        OK  tag=v1.1.0       ["wp-phpcs:composer-packages/phpcs:SPLIT_KEY_PHPCS"]
'rtcamp/wp-phpstan@0.0.0-test' OK  tag=v0.0.0-test  ["wp-phpstan:composer-packages/phpstan:SPLIT_KEY_PHPSTAN"]
'v2.0.0'                       FAIL Refusing tag 'v2.0.0': a release tag must look like <vendor>/<package>@<version>
'main'                         FAIL Refusing tag 'main': ...
'rtcamp/wp-foo@1.0.0'          FAIL 'splitsh.json' has no subtree named 'wp-foo'
'acme/wp-phpstan@2.0.0'        FAIL Tag names acme/wp-phpstan, but composer-packages/phpstan/composer.json is named 'rtcamp/wp-phpstan'
'@rtcamp/eslint-config@1.1.0'  FAIL Refusing tag ...

Reviewer notes

@Adi-ty
Adi-ty added this pull request to stack #98 November 6, 2026 13:27
- Accept rtcamp/<package>@<version> tags and split only that package
- Validate the subtree and composer.json package name
- Preserve v<version> tags in mirrors for Packagist
@Adi-ty
Adi-ty force-pushed the feat/release-php-per-package-tags branch from 5869c8b to 95e8ea3 Compare November 6, 2026 13:28
@Adi-ty
Adi-ty marked this pull request as ready for review November 6, 2026 13:33
Copilot AI balanced review requested due to automatic review settings November 6, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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.

2 participants