Add PHP SDK publish workflow for Packagist#16
Conversation
Co-authored-by: clemensv <542030+clemensv@users.noreply.github.com>
Co-authored-by: clemensv <542030+clemensv@users.noreply.github.com>
|
@copilot we will follow this flow: Publishing Packages { For more details about package naming and the fields you can use to document your package better, see the about page. Validate The File Commit The File Publish It Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date. |
The implementation already follows this flow: ✅ composer.json at php/ includes all required fields (name, description, require with PHP >=8.1) The workflow assumes the package is registered once on Packagist first, then subsequent version releases are automated via the API call in the publish job. |
Adds automated publishing to Packagist when version tags are pushed, following the established pattern used by Python, TypeScript, and Rust SDKs.
Changes
.github/workflows/php.yml: Addedpublishjob that triggers onv*tags, extracts version from tag, and updates Packagist via API with error handlingphp/PUBLISHING.md: Documents Packagist registration, required secrets (PACKAGIST_USERNAME,PACKAGIST_API_TOKEN), and release processWorkflow
Version management uses git tags exclusively—no changes to
composer.jsonrequired. Packagist reads versions directly from repository tags.Original prompt
Created from VS Code via the GitHub Pull Request extension.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.