Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 969 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 969 Bytes

Private Packagist Composer Split

Demo for automating the publication of packages in subdirectories of a single GitHub repository.

Requirements

  • PHP 7.0+

Installation

  1. Clone this repo
git clone git@github.com:packagist/composer-split.git
  1. Edit .env
cp .env.dist .env

Then edit .env with your Private Packagist API credentials and GitHub parameters.

The GitHub repo configured in .env needs to have a composer.json in each subdirecotry in order to publish that as a package in Private Packagist.

Basic usage

Host this repo somewhere and add web/composer-split.php in a GitHub webhook. This will update your packages in Private Packagist each time you push a change to GitHub. In case the webhook time out if you have multiple versions or subdirectories, you can run bin/composer-split.php as part of your CI/CD build or with GitHub actions.

License

private-packagist/composer-split is licensed under the MIT License