Cloud Integration
Github Configurationβ
Generating a GitHub Personal Access Tokenβ
To enable your Flutter CLI tool to upload and delete releases on GitHub, you'll need to generate a Personal Access Token (PAT) with the appropriate permissions. Follow the steps below to create and configure your token.
Steps to Generate a GitHub Tokenβ
-
Open the GitHub Token Generation Page:
-
Set the Token Name:
- In the Note field, enter a descriptive name for your token, such as
Flutter Release X Token.
- In the Note field, enter a descriptive name for your token, such as
-
Select Scopes:
- Under Select scopes, check the following permissions:
repo(Full control of private repositories)- This includes access to public and private repositories, which is required for uploading and deleting releases.
- Under Select scopes, check the following permissions:
-
Generate the Token:
- Click the Generate token button at the bottom of the page.
- Copy the token immediately, as you wonβt be able to see it again.
-
Set Up Your Project:
github:
enabled: true
token: YOUR_GITHUB_TOKEN
Google Drive Configurationβ
To upload files to Google Drive, follow these steps to set up your credentials:
-
Create a Google Cloud Project:
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
-
Enable the Drive API:
- In the Google Cloud Console, navigate to APIs & Services > Library.
- Search for "Google Drive API" and enable it.
-
Create OAuth 2.0 Credentials:
- Go to APIs & Services > Credentials.
- Click on Create Credentials and select OAuth Client ID.
- Configure the consent screen if prompted.
- Set the application type to Desktop App.
- Note down the generated Client ID and Client Secret.
-
Set Up Your Project:
google_drive:
enabled: true
client_id: YOUR_CLIENT_ID
client_secret: YOUR_CLIENT_SECRETBy following these steps, your application will be able to authenticate with Google Drive using the client ID and secret to upload files.
Diawi Configurationβ
Diawi is a service for distributing iOS and Android apps via direct download links. To configure Diawi:
-
Create a Diawi Account:
- Go to Diawi and create an account.
-
Get Your API Token:
- Log in to your Diawi account.
- Go to Profile > API.
- Copy your API token.
-
Set Up Your Project:
diawi:
enabled: true
token: YOUR_DIAWI_TOKEN
wall_of_apps: false
find_by_udid: false
AWS S3 Configurationβ
To upload files to AWS S3, you'll need AWS credentials with S3 upload permissions:
-
Create AWS Credentials:
- Go to the AWS IAM Console.
- Create a new user or use an existing one.
- Attach a policy with S3 upload permissions (e.g.,
AmazonS3FullAccessor a custom policy). - Create an Access Key ID and Secret Access Key.
-
Create an S3 Bucket:
- Go to the S3 Console.
- Create a new bucket or use an existing one.
- Note: For public access, configure bucket permissions appropriately.
-
Set Up Your Project:
aws:
enabled: true
access_key_id: YOUR_AWS_ACCESS_KEY_ID
secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
region: us-east-1
bucket_name: your-bucket-name
key_prefix: flutter-release-x
Important: Ensure your S3 bucket has the appropriate permissions. For public downloads, enable public read access. For private files, consider using presigned URLs.
GitLab Configurationβ
To upload releases to GitLab:
-
Generate a Personal Access Token:
- Go to GitLab Profile > Personal Access Tokens.
- Create a token with
apiscope. - Copy the token.
-
Find Your Project ID:
- Go to your GitLab project.
- The Project ID is shown on the project's main page under the project name, or in Settings > General.
-
Set Up Your Project:
gitlab:
enabled: true
token: YOUR_GITLAB_TOKEN
project_id: "12345678"
tag: v0.0.1
ref: main
host: https://gitlab.com
Note: For self-hosted GitLab instances, update the
hostfield with your GitLab URL.
Google Play Store Configurationβ
To upload apps to Google Play Store:
-
Create a Service Account:
- Go to Google Cloud Console.
- Create a new project or select an existing one.
- Enable the Google Play Android Developer API.
- Create a Service Account and download the JSON key file.
-
Grant Access in Play Console:
- Go to Google Play Console.
- Navigate to Setup > API access.
- Link your service account and grant appropriate permissions.
-
Set Up Your Project:
play_store:
enabled: true
service_account_json_path: ./path/to/service-account.json
package_name: com.example.app
track: internal
release_name: "Release v1.0.0"
Apple App Store Configurationβ
To upload apps to App Store Connect:
-
Generate an API Key:
- Go to App Store Connect.
- Navigate to Users and Access > Keys.
- Create a new API key with App Manager or Admin role.
- Download the
.p8key file and note the Key ID and Issuer ID.
-
Find Your App ID:
- In App Store Connect, go to My Apps.
- Select your app and find the App ID in the App Information section.
-
Set Up Your Project:
app_store:
enabled: true
api_key_path: ./path/to/AuthKey_XXXXXXXXXX.p8
api_issuer: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
app_id: "1234567890"
bundle_id: com.example.app
Note: Full IPA upload via App Store Connect API requires proper JWT signing. For production uploads, consider using Transporter, Fastlane, or Xcode Organizer for more reliable uploads.