Composer
Install a private Composer Pack, and publish one by pushing to GitHub.
These are the lines PolyPack shows on a Composer Pack's page, here for Hopper Digital's hopper/widgets.
Install
composer config repositories.hopper composer https://hopper.pkg.polypack.io/composer
composer config --global --auth bearer.hopper.pkg.polypack.io <your Token>
composer require hopper/widgets
The repository line is safe to commit: it holds no secret. The Token goes in your own auth.json, never in the project. Public Packs need no Token.
Publish
Composer Packs come from GitHub. An Admin connects the PolyPack GitHub App to the Team and binds a repository to the Pack. From then on:
- every Git tag becomes a release, such as
v1.4.0becoming1.4.0; - the default branch becomes a dev version, such as
dev-main, and so does any branch matching the Pack's branch patterns (for example*.x); - a push, a new tag or a deleted branch is synced within moments, and each Sync is listed on the Pack's page with what it did and why.
PolyPack builds and stores a zip of each version, so installs never depend on GitHub being up.
Monorepos
One repository can hold several Composer Packs, each in its own directory, such as packages/forms and packages/tables. No split repositories are needed.
- On the Repositories page, Find Packs lists every
composer.jsonon the default branch. Tick the ones to sync: each is bound to the Pack of its name, which is created if the Team has none. - Each version of a Pack holds its directory only, with its files at the top, just as Composer would get them from a repository of their own.
- By default, a Git tag such as
v2.0.0releases every Pack of the repository. To release a Pack on its own, give it a tag prefix, such astables/: then only tags such astables/v2.0.0release it, asv2.0.0, and the other Packs leave those tags alone. - A push that changes one package leaves the others' dev versions as they were: nothing is rebuilt for a directory that did not change.
Abandoned Packs
An Admin can mark a Composer Pack abandoned, optionally naming its replacement. Composer then warns everyone who installs it.
For CI pipelines, see CI.