Game Framework
Migration

Dual Publishing

Publish packages to both Game Framework and pub.dev.

Why Dual Publish?

  • Open Source + Private versions
  • Gradual Migration - Transition period
  • Backwards Compatibility - Support existing users

Publishing Workflow

# 1. Publish to Game Framework (private)
flutter pub publish --server=https://registry.yourcompany.com

# 2. Publish to pub.dev (public, if applicable)
flutter pub publish

Automated Dual Publishing

# .github/workflows/publish.yml
name: Dual Publish
on:
  push:
    tags: ['v*']
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: subosito/flutter-action@v2
      
      # Publish to Game Framework
      - name: Publish to Game Framework
        env:
          GF_PUB_TOKEN: ${{ secrets.GAME_FRAMEWORK_TOKEN }}
        run: flutter pub publish --force --server=https://registry.yourcompany.com
      
      # Publish to pub.dev (if public)
      - name: Publish to pub.dev
        if: contains(github.ref, '-public')
        env:
          PUB_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
        run: flutter pub publish --force

Version Strategy

Same Version Both Places

version: 1.0.0  # Same on both registries

Different Versions

# Private (Game Framework): 1.1.0 (with internal features)
# Public (pub.dev): 1.0.0 (without internal features)

Next Steps