Skip to content

Conversation

@deluxetom
Copy link
Collaborator

Summary

  • Add new GitHub Actions workflow that splits monorepo packages to their respective read-only sub-repositories
  • Triggers automatically when semantic-release creates a new tag
  • Splits all 9 packages in parallel using matrix strategy, pushing code and tags to each sub-repo

Package Mapping

Source Path Target Repository
src/Core/ secretary/php-core
src/Adapter/AWS/SecretsManager/ secretary/php-aws-secrets-manager-adapter
src/Adapter/GCP/SecretsManager/ secretary/php-gcp-secrets-manager-adapter
src/Adapter/Hashicorp/Vault/ secretary/php-hashicorp-vault-adapter
src/Adapter/Local/JSONFile/ secretary/php-json-file-adapter
src/Adapter/Cache/PSR6Cache/ secretary/php-psr6-cache-adapter
src/Adapter/Cache/PSR16Cache/ secretary/php-psr16-cache-adapter
src/Adapter/Chain/ secretary/php-chain-adapter
src/Bundle/SecretaryBundle/ secretary/php-secretary-bundle

Required Setup

Important

A repository secret SPLIT_TOKEN must be configured before this workflow will function.

  1. Create a Personal Access Token (classic) with repo scope
  2. Ensure the token has write access to all secretary/* sub-repositories
  3. Add it as a repository secret named SPLIT_TOKEN

The default GITHUB_TOKEN cannot push to other repositories, hence the need for a PAT.

Test plan

  • Merge PR and create SPLIT_TOKEN secret
  • Trigger a new release (or manually push a test tag)
  • Verify workflow runs successfully in Actions tab
  • Confirm sub-repositories receive the new code and tag
  • Verify packages install correctly from Packagist

@cryptiklemur
Copy link
Contributor

Hey! Thanks for throwing this up. Right now this repo uses https://www.subtreesplit.com. Little tool created by Tobias Nyholm from the symfony team (and co-creator of php-cache with me), and Fabien.

Its SUPPOSED to sync the tags when they are pushed, but right now its saying they are all up to date.

I did reach out to Tobias to try to debug this issue and get it fixed, but i havent heard back yet.

@deluxetom
Copy link
Collaborator Author

yea I figured we could automate it with a workflow, I had a good chat with Tobias at SymfonyCon, super cool guy but I also pinged him for an update on async-aws and no reply yet :)

@deluxetom
Copy link
Collaborator Author

@cryptiklemur let me know if there's anything I can help with, to fix the tags. I would need the Symfony 8 support for all of them :)

@cryptiklemur cryptiklemur merged commit 1333ce8 into master Jan 20, 2026
34 checks passed
@cryptiklemur
Copy link
Contributor

yeah, unfortunately no response from @Nyholm

@Nyholm
Copy link

Nyholm commented Jan 20, 2026

Hello.
Sorry for missing pings. Where are you all trying to reach me?

:/

@cryptiklemur
Copy link
Contributor

No worries! I was trying to ping you on X, but the issue is just this: #18 (comment)

@Nyholm
Copy link

Nyholm commented Jan 20, 2026

Oh, Yeah. I basically stopped being there since Elon took over.

Should I still take a look and see what's up?

@deluxetom deluxetom deleted the feature/monorepo-split-workflow branch January 20, 2026 18:57
@deluxetom
Copy link
Collaborator Author

@cryptiklemur make sure to create a PAT and set the action secret SPLIT_TOKEN, then you should be able to run it by hand

@cryptiklemur
Copy link
Contributor

Oh, Yeah. I basically stopped being there since Elon took over.

Should I still take a look and see what's up?

heh, totally valid. I did the same thing. If you find some spare time, sure, not a big deal though.

@cryptiklemur
Copy link
Contributor

@cryptiklemur make sure to create a PAT and set the action secret SPLIT_TOKEN, then you should be able to run it by hand

It needs a workflow_dispatch event trigger to run by hand

@deluxetom
Copy link
Collaborator Author

@cryptiklemur you're right, there you go: #19

@github-actions
Copy link

🎉 This PR is included in version 4.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants