Game Framework
Package Management

Publishing Workflow

Complete workflow for publishing Flutter packages to Game Framework.

Pre-Publish Checklist

  • Tests pass (flutter test)
  • Analysis clean (flutter analyze)
  • Version updated in pubspec.yaml
  • CHANGELOG updated
  • README complete
  • LICENSE file present
  • publish_to set correctly

Publishing Workflow

Prepare Package

# Run tests
flutter test

# Check for issues
flutter analyze

# Validate package
flutter pub publish --dry-run

Update Version

# pubspec.yaml
version: 1.1.0  # Increment version

Update CHANGELOG.md:

## 1.1.0
- Added feature X
- Fixed bug Y

Publish

flutter pub publish --server=https://registry.yourcompany.com

Verify

curl https://registry.yourcompany.com/v1/packages/my_package \
  -H "Authorization: Bearer YOUR_TOKEN"

Automated Publishing (CI/CD)

# .github/workflows/publish.yml
name: Publish
on:
  push:
    tags: ['v*']
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: subosito/flutter-action@v2
      - run: flutter test
      - run: flutter pub publish --force
        env:
          GF_PUB_TOKEN: ${{ secrets.GAME_FRAMEWORK_TOKEN }}

See CI/CD Guide for details.

Publishing Best Practices

  1. Always test before publishing
  2. Use semantic versioning
  3. Document breaking changes
  4. Tag releases in Git
  5. Announce major updates

Next Steps