Game Framework
Migration

Importing Packages

Import multiple packages at once into Game Framework.

Bulk Import API

curl -X POST https://registry.yourcompany.com/v1/workspaces/ws_ID/packages/import \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "packages": [
      {"name": "package1", "source": "filesystem", "path": "/path/to/package1"},
      {"name": "package2", "source": "filesystem", "path": "/path/to/package2"}
    ]
  }'

Import from File System

# Import script
for dir in packages/*/; do
  cd "$dir"
  flutter pub publish --server=https://registry.yourcompany.com --force
  cd -
done

Import from Git

# Clone and publish
repos=("repo1" "repo2" "repo3")
for repo in "${repos[@]}"; do
  git clone "https://github.com/company/$repo"
  cd "$repo"
  flutter pub publish --server=https://registry.yourcompany.com --force
  cd ..
done

Import with CI/CD

# GitHub Actions
name: Bulk Import
on: workflow_dispatch
jobs:
  import:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        package: [package1, package2, package3]
    steps:
      - uses: actions/checkout@v4
        with:
          repository: company/${{ matrix.package }}
      - uses: subosito/flutter-action@v2
      - run: flutter pub publish --force
        env:
          GF_PUB_TOKEN: ${{ secrets.GAME_FRAMEWORK_TOKEN }}

Next Steps