Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 2.48 KB

File metadata and controls

105 lines (77 loc) · 2.48 KB

Publishing Guide for flame_ldtk

Pre-publication Checklist ✅

  • LICENSE file (MIT)
  • CHANGELOG.md with version 0.1.0
  • pubspec.yaml with all metadata
  • README.md with complete documentation
  • analysis_options.yaml configured
  • All tests passing (11/11)
  • No analysis issues
  • Example app working

Publishing Steps

1. Dry Run

First, test the package publication without actually publishing:

flutter pub publish --dry-run

This will validate:

  • Package structure
  • Required files (LICENSE, README, CHANGELOG, pubspec.yaml)
  • File size limits
  • Documentation completeness

2. Review Output

Check for any warnings or issues in the dry-run output.

3. Publish to pub.dev

If the dry-run succeeds, publish for real:

flutter pub publish

You'll be prompted to:

  1. Confirm the package name and version
  2. Authenticate with your Google account
  3. Confirm the publication

4. Post-Publication

After publishing:

  1. Verify on pub.dev: Visit https://pub.dev/packages/flame_ldtk

  2. Check package score: Wait ~10 minutes for pub.dev to analyze

  3. Update README badges (optional):

    [![pub package](https://img.shields.io/pub/v/flame_ldtk.svg)](https://pub.dev/packages/flame_ldtk)
    [![popularity](https://img.shields.io/pub/popularity/flame_ldtk?logo=dart)](https://pub.dev/packages/flame_ldtk/score)
  4. Tag the release on GitHub:

    git tag v0.1.0
    git push origin v0.1.0

Troubleshooting

Common Issues

"Package validation failed"

  • Ensure all required files exist
  • Check file names are correct (lowercase)
  • Verify LICENSE format

"Version already exists"

  • Cannot republish same version
  • Increment version in pubspec.yaml
  • Update CHANGELOG.md

"Package name already taken"

  • Choose a different name
  • Update pubspec.yaml and file references

"Upload failed"

  • Check internet connection
  • Verify Google account credentials
  • Try again in a few minutes

Future Releases

When releasing new versions:

  1. Update version in pubspec.yaml
  2. Update CHANGELOG.md with new features/fixes
  3. Run tests: flutter test
  4. Run analysis: flutter analyze
  5. Update README if needed
  6. Follow steps 1-4 above

Version Numbering

Follow Semantic Versioning:

  • MAJOR (1.0.0): Breaking changes
  • MINOR (0.2.0): New features, backwards compatible
  • PATCH (0.1.1): Bug fixes, backwards compatible

Current version: 0.1.0 (initial release)