- GitHub account
- Packagist account (https://packagist.org)
- GitHub repository for the package
- Create a new repository on GitHub:
smartness/translation-client - Initialize git in the package directory:
cd packages/smartness/translation-client
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin git@github.com:smartness/translation-client.git
git push -u origin mainCreate a version tag (following semantic versioning):
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0- Go to https://packagist.org
- Click "Submit" in the top menu
- Enter your GitHub repository URL:
https://github.com/smartness/translation-client - Click "Check"
- If validation passes, click "Submit"
Packagist will automatically suggest setting up a webhook. Follow their instructions.
In your GitHub repository settings:
- Go to Settings → Webhooks → Add webhook
- Payload URL:
https://packagist.org/api/github?username=YOUR_PACKAGIST_USERNAME - Content type:
application/json - Secret: Your Packagist API token (from packagist.org/profile)
- Events: "Just the push event"
In a test Laravel project:
composer require smartness/translation-client- Make your changes
- Update version in composer.json if needed
- Commit changes
- Create a new tag:
git tag -a v1.0.1 -m "Release version 1.0.1"
git push origin v1.0.1- Packagist will auto-update (if webhook is configured)
Follow semantic versioning (https://semver.org):
- MAJOR (v2.0.0): Breaking changes
- MINOR (v1.1.0): New features, backward compatible
- PATCH (v1.0.1): Bug fixes, backward compatible
- Always test before releasing
- Update CHANGELOG.md with each release
- Use semantic versioning
- Write clear commit messages
- Tag releases consistently
- Keep README up to date
- All code is tested and working
- README.md is complete and accurate
- LICENSE.md is included
- composer.json has correct metadata
- Package name is available on Packagist
- GitHub repository is public
- Version tag is created
- Packagist submission is complete
- Wait a few minutes for Packagist to index
- Check that your repository is public
- Verify composer.json syntax is valid
- Verify webhook is configured correctly
- Check webhook delivery in GitHub settings
- Manually update on Packagist as fallback
- Packagist: https://packagist.org
- Composer documentation: https://getcomposer.org/doc/
- Semantic Versioning: https://semver.org