File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Setup Flutter Platforms and Build
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : write
8+
9+ jobs :
10+ setup-and-build :
11+ runs-on : macos-latest
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ with :
17+ token : ${{ secrets.GITHUB_TOKEN }}
18+
19+ - name : Setup Flutter
20+ uses : subosito/flutter-action@v2
21+ with :
22+ flutter-version : ' 3.38.7'
23+
24+
25+ - name : Enable iOS support
26+ run : |
27+ if [ ! -d "ios" ]; then
28+ flutter create --platforms ios .
29+ echo "iOS support enabled"
30+ else
31+ echo "iOS already configured"
32+ fi
33+
34+
35+ - name : Build iOS (debug)
36+ run : |
37+ flutter build ios --debug --no-codesign
38+ echo "iOS build completed"
39+
40+ - name : Check for changes
41+ id : check-changes
42+ run : |
43+ git status --porcelain
44+ if git status --porcelain | grep -q .; then
45+ echo "changes_detected=true" >> $GITHUB_OUTPUT
46+ else
47+ echo "changes_detected=false" >> $GITHUB_OUTPUT
48+ fi
49+
50+ - name : Configure Git
51+ if : steps.check-changes.outputs.changes_detected == 'true'
52+ run : |
53+ git config --global user.name "ILoveScratch"
54+ git config --global user.email "yaowendao2023@qq.com"
55+
56+ - name : Commit and push changes
57+ if : steps.check-changes.outputs.changes_detected == 'true'
58+ run : |
59+ git add .
60+ git commit -m "chore: enable iOS platforms"
61+ git push https://github.com/ILoveScratch2/TouchFish-Client.git
You can’t perform that action at this time.
0 commit comments