Agent skill
automate-flutter-app-releases
Automate your Flutter app releases to beta or production with this handy shell script that handles version bumping, formatting, cleaning, rebuilding, and deployment via Fastlane.
Install this agent skill to your Project
npx add-skill https://github.com/rodydavis/skills/tree/main/skills/automate-flutter-apps
Metadata
Additional technical details for this skill
- last modified
- Tue, 03 Feb 2026 20:04:27 GMT
SKILL.md
Automate Flutter App Releases
TLDR You can find the script here.
#!/bin/bash
echo "App Release Automator by @rodydavis"
action="$1"
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
if [ ${action} = "build" ]; then
echo "${green}Generating built files.. ${reset}"
flutter packages pub run build_runner clean
flutter packages pub run build_runner build --delete-conflicting-outputs
pub global activate pubspec_version
git commit -a -m "Build $(pubver bump patch)"
echo "${green}Building Project...${reset}"
find . -name "*-e" -type f -delete
flutter format .
flutter clean
echo "${green}Project Size: $(find . -name "*.dart" | xargs cat | wc -c)${reset}"
echo "${green}Building APK...${reset}"
flutter build apk
echo "${green}Builing IPA..${reset}"
cd ./ios && pod install && pod repo update && cd ..
flutter build ios
git commit -a -m "Project Rebuilt"
elif [ ${action} = "beta" ]; then
echo "${green}Generating built files..${reset}"
flutter packages pub run build_runner clean
flutter packages pub run build_runner build --delete-conflicting-outputs
pub global activate pubspec_version
git commit -a -m "Beta $(pubver bump patch)"
echo "${green}Building Project...${reset}"
find . -name "*-e" -type f -delete
flutter format .
flutter clean
echo "${green}Project Size: $(find . -name "*.dart" | xargs cat | wc -c)${reset}"
echo "${green}Building APK...${reset}"
flutter build apk
echo "${green}Sending Android to Beta...${reset}"
cd ./android && fastlane beta && cd ..
echo "${green}Builing IPA..${reset}"
flutter build ios
echo "${green}Sending iOS to Beta..${reset}"
cd ./ios && fastlane beta && cd ..
git commit -a -m "Sent to Beta"
elif [ ${action} = "release" ]; then
echo "${green}Generating built files..${reset}"
flutter packages pub run build_runner clean
flutter packages pub run build_runner build --delete-conflicting-outputs
pub global activate pubspec_version
git commit -a -m "Production $(pubver bump minor)"
echo "${green}Building Project...${reset}"
find . -name "*-e" -type f -delete
flutter format .
flutter clean
echo "${green}Project Size: $(find . -name "*.dart" | xargs cat | wc -c)${reset}"
echo "${green}Building APK...${reset}"
flutter build apk
echo "${green}Sending Android to Production...${reset}"
cd ./android && fastlane release && cd ..
echo "${green}Builing IPA..${reset}"
flutter build ios
echo "${green}Sending iOS to Production...${reset}"
cd ./ios && fastlane release && cd ..
git commit -a -m "Sent to Production"
fi
echo "${green}Successfully completed${reset}"
Needed:
- Fastlane setup in each directory
- build_runner as a dependency
- Git Project in VCS
Steps to Run:
- Download this file and put it at the root level of your flutter project
- Open the terminal and navigate to your project location
- Enter this command:
chmod +x release.sh
Usage
- For beta:
./release.sh beta - For production:
./release.sh release
It will do the following:
- Bump the version numbers if you are using the version in the
pubspec.yaml - Release the apps with Fastlane
- Format all Dart Files
- Clean Project
- Rebuild classes
- Add commit message
Make your life easier and automate your builds to beta and production!
What you need
- Fastlane setup in each directory
- build_runner as a dependency
- Git Project in VCS
Initial Setup
- Download this file
- Put it at the root level of your flutter project
- Open the terminal and navigate to your project location
- Enter this command: chmod +x release.sh
Usage
Now you can call this script!
- For beta:
./release.sh beta - For production:
./release.sh release
Overview
- Bump the version numbers if you are using the version in the pubspec.yaml
- Release the apps with Fastlane
- Format all Dart Files
- Clean Project
- Rebuild classes
- Add commit messages
- Updates Cocoa Pods
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
how-to-do-offline-recommendations-with-sqlite-and-gemini
Learn how to enhance your CMS like PocketBase with AI-powered content recommendations using text embeddings, SQLite, and k-nearest neighbor search for efficient and scalable related content suggestions.
how-to-build-a-webrtc-signal-server-with-pocketbase
Learn how to build a simple WebRTC video call application using PocketBase as a signaling server, enabling peer-to-peer communication with SQLite on the server and realtime updates via Server Sent Events.
flutter-terminal-cheat-sheet
This post provides a handy collection of Flutter commands and scripts for web development, package creation, troubleshooting, testing, and more, streamlining your Flutter workflow.
how-to-print-multiple-objects-to-the-console-with-print-in-dart
Learn how to print multiple objects to the console in Dart using Records, offering a similar experience to JavaScript's `console.log()` functionality.
flutter-input-output-preview
Build responsive Flutter apps with a reusable `TwoPane` widget and an `InputOutputPreview` component for side-by-side code and preview display on both mobile and desktop.
displaying-html-in-flutter
Easily display and interact with HTML content in your Flutter app using the `easy_web_view` package, which supports both web and mobile platforms.
Didn't find tool you were looking for?