Flutter Release X

website·Indexed 31 days ago

https://frx.elpisverse.com

A tool for automating Flutter app releases, featuring build pipelines, QR code generation, and cloud integrations with GitHub, Google Drive, and GitLab. It provides automated notifications for Slack and Microsoft Teams, as well as git-hook integration to run analysis and tests automatically.

Tokens
14.8K
Snippets
99
Records
120
Agent score
51%

What's inside FRX

  1. Overview of Flutter Release X (frx)

    Flutter Release X (frx) is an all-in-one release automation CLI designed for Flutter applications. It automates the entire workflow from building and uploading apps to implementing git hooks for commit guards. It supports Android, iOS, Web, macOS, Windows, and Linux.
  2. Understand the FRX QR code generation workflow

    FRX automatically generates a QR code after the frx build command completes. The process follows these steps: 1. The release artifact (e.g., APK, IPA) is uploaded to the configured cloud provider. 2. A download URL is generated. 3. FRX encodes that URL into a QR code. 4. The QR code is displayed in the terminal and/or saved as an image file.
  3. Configure Slack notifications and sharing

    Configure Slack integration to notify channels about new builds. You can customize the message, mention specific user IDs (not usernames), and toggle whether to share the QR code or download link.
    upload_options:
      slack:
        enabled: true
        bot_user_oauth_token: xoxb-XXXXXXXXX
        default_channel_id: CXXXXXXXXX
        share_QR: true
        share_link: true
        custom_message: "🚀 Check out the latest build!"
        mention_users: ["U0XXXXXXX", "U08XXXXXXXX"]
  4. Initialize an FRX project

    Run frx init to generate a config.yaml file in your current directory. This file contains upload options, QR code defaults, and multi-framework pipeline examples. After initialization, you must uncomment the desired services in config.yaml, add your API keys/tokens, and then run frx build to execute the automation.
    frx init
  5. Prerequisites for Slack build notifications

    To send automatic notifications to Slack, you need:

    1. A Slack workspace with a dedicated channel for notifications.
    2. A Slack Bot configured with chat:write and files:write scopes.
    3. The Bot's OAuth Token (starting with xoxb-...) and the target Channel ID.
  6. Initialize a new Flutter Release X project

    After installing FRX, use the frx init command to create a config.yaml file. This file contains all available configuration options, comments, and framework examples. To complete the setup, configure the settings in config.yaml, provide the necessary API keys and tokens, and execute the build command.
    # 1. Initialize the project and create config.yaml
    frx init
    
    # 2. (Manual step) Edit config.yaml with your settings and API keys
    
    # 3. Start the build and release process
    frx build
  7. Install and manage Git Hooks

    Flutter Release X includes a git hooks system (similar to Husky). Hooks are defined in config.yaml and must be installed into the .git/hooks/ directory to be active.
    # Install all enabled hooks
    frx hooks install
    
    # Preview installation without writing files
    frx hooks install --dry-run
    
    # Show all configured hooks and their install status
    frx hooks list
    
    # Manually trigger a specific hook (e.g., for testing)
    frx hooks run <name>
    
    # Remove all FRX-managed git hooks
    frx hooks uninstall
    
    # Remove one specific hook
    frx hooks uninstall --hook <name>
    
    # Validate hooks configuration
    frx hooks validate
  8. Define and run named pipelines in Flutter Release X

    Starting in FRX v0.6.0, you can define multiple named workflows in a config.yaml file. This allows you to separate different automation tasks (e.g., building, linting, testing) and execute them independently.
    pipelines:
      build:
        description: "Build and distribute the Flutter app"
        steps:
          - name: "Install Dependencies"
            command: "flutter pub get"
          - name: "Build APK"
            command: "flutter build apk --release"
            upload_output: true
            output_path: "./build/app/outputs/flutter-apk/app-release.apk"
    
      lint:
        description: "Lint and analyze code"
        steps:
          - name: "Analyze"
            command: "flutter analyze"
            allow_failure: true
  9. Include user names in Teams notifications

    You can include user display names in the mention_users list in your configuration. Note that Microsoft Teams webhooks do not support actual @mentions; user names will be rendered as plain text (e.g., "Mentioning: John Doe, Jane Smith"). For actual @mentions, the Microsoft Graph API or Bot Framework is required.
  10. Report bugs or request features for FRX

    Users can provide feedback or report technical issues for Flutter Release X (FRX) through the following channels:

    • Bug Reports: Submit a bug report via the GitHub Issues page. It is recommended to check the Troubleshooting Guide before submitting.
    • Feature Requests: Submit new ideas or feature requests via the project's feedback form.
    • General Feedback: A dedicated feedback form is available for quick improvements.
  11. Find Slack Channel and User IDs

    To target specific destinations or people in Slack, you need their unique identifiers:

    • Channel ID: Open the desired channel in Slack and click the channel name at the top. In the browser URL (e.g., https://app.slack.com/client/T.../CXXXXXXXXX), the string after the last slash (e.g., CXXXXXXXXX) is the CHANNEL_ID.
    • User ID: Open a user's profile, click the three dots (more menu), and select Copy Member Id (e.g., UXXXXXXXX).