ワンクリックで
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.
// 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.
Ensure that all the docs are up to date for the project.
Learn how to host PocketBase and an Astro SSR application on the same server, using PocketBase's Go integration and a reverse proxy to delegate requests to Astro for dynamic web content.
Explore how to effectively manage asynchronous data with Preact Signals by creating a custom `asyncSignal` that handles loading, error, and data states without breaking the synchronous nature of signals.
Learn how to create a Lit web component with CodeMirror, dynamically themed using Material Design's color utilities, for a customizable code editing experience.
Explore Dart's bitwise operations for both integers and booleans, including AND, OR (inclusive & exclusive), NAND, NOR, and XNOR, with practical code examples.
Discover the surprising flexibility of calling Dart functions, including mixed positional and named arguments, the `.call` operator, and dynamic invocation with `Function.apply`.
| name | automate-flutter-app-releases |
| description | 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. |
| metadata | {"url":"https://rodydavis.com/posts/automate-flutter-apps","last_modified":"Tue, 03 Feb 2026 20:04:27 GMT"} |
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:
Steps to Run:
chmod +x release.shUsage
./release.sh beta./release.sh releaseIt will do the following:
pubspec.yamlMake your life easier and automate your builds to beta and production!
Now you can call this script!
./release.sh beta./release.sh release