This template helps developers get started with publishing the PHP SDK to Packagist package repository.
Before you can publish this SDK to packagist you need to:
- Create an account on Packagist.
- Set the following secrets in your repository:
PACKAGIST_USERNAME
: Your packagist username.PACKAGIST_TOKEN
: Your packagist token. You can find it in your packagist account settings.
This repository contains the following:
- A
README
that contains the instructions
-
Create a new target PHP SDK Repo by clicking the Use this template button at the top of this repository.
-
If you already have a Control Repo:
-
Update your
LIBLAB_GITHUB_TOKEN
actions secret to a new token that has access to all your existing SDK repos, as well as this new one. -
Update the
githubRepoName
field in thephp
section of your liblab config file to the name of your new repo.
-
-
Run the GitHub Action
Generate SDKs using liblab
in the Control Repo that builds the SDK, and raises a PR against this target SDK Repo. This will be triggered automatically when you commit and push the update to the liblab config file. -
Review and merge the PR.
-
Create a new release here in the PHP SDK repo.
-
(First time only) Go to the Packagist website and click the
Submit
button to submit your package. Enter in the URL of your GitHub repository and Packagist will automatically update your package when you push a new release. Subsequent releases will be automatically updated on Packagist.