Skip to content

Commit f9fa2df

Browse files
committed
Fix workflow to handle gitignored local.properties
- Remove local.properties from git commit (it's generated by Flutter) - Only commit pubspec.yaml version changes - Add android/local.properties to .gitignore if not already present
1 parent 7f1a28b commit f9fa2df

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ jobs:
3838
- name: Update version in pubspec.yaml
3939
run: |
4040
sed -i "s/version: .*/version: ${{ steps.version.outputs.current_version }}+${{ steps.version.outputs.new_build }}/" pubspec.yaml
41-
# Update local.properties as well to keep in sync
42-
echo "flutter.versionName=${{ steps.version.outputs.current_version }}" > android/local.properties
43-
echo "flutter.versionCode=${{ steps.version.outputs.new_build }}" >> android/local.properties
44-
echo "flutter.buildMode=release" >> android/local.properties
4541
4642
- name: Build web
4743
run: flutter build web --release
@@ -131,7 +127,7 @@ jobs:
131127
run: |
132128
git config user.name "github-actions[bot]"
133129
git config user.email "github-actions[bot]@users.noreply.github.com"
134-
git add pubspec.yaml android/local.properties
130+
git add pubspec.yaml
135131
# Only commit if there are changes
136132
if git diff --staged --quiet; then
137133
echo "No version changes to commit"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ app.*.map.json
4747

4848
# Secrets
4949
/lib/correct_passwords.dart
50+
android/local.properties

0 commit comments

Comments
 (0)