File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - master
5+
6+ # on: push # Default will running for every branch.
7+ name : " Build & Release" # Defind your job name whatever you want
8+ jobs :
9+ build :
10+ # This job will run on ubuntu virtual machine
11+ name : Build & Release
12+ runs-on : ubuntu-latest # can use window, ubuntu macos and linux
13+ steps :
14+ # Setup Java environment in order to build the Android app.
15+ - uses : actions/checkout@v1
16+ - uses : actions/setup-java@v1
17+ with :
18+ java-version : ' 12.x'
19+ # Setup the flutter environment.
20+ - uses : subosito/flutter-action@v1
21+ with :
22+ channel : ' stable' # 'dev', 'master', default to: 'stable'
23+ flutter-version : ' 3.0.5' # this is your flutter version<make sure your flutter version>
24+ - run : flutter pub get
25+
26+ # - run: flutter test # Run widget tests for our flutter project.I'm not run for now.
27+
28+ # build apk and app file
29+ - run : flutter build apk --release --split-per-abi
30+ # - run: |
31+ # flutter build ios --no-codesign
32+ # cd build/ios/iphoneos
33+ # mkdir Payload
34+ # cd Payload
35+ # ln -s ../Runner.app
36+ # cd ..
37+ # zip -r app.ipa Payload
38+
39+ # Upload generated apk and app to the artifacts.
40+ - name : Push to Releases # Defind your name whatever you want
41+ uses : ncipollo/release-action@v1
42+ with :
43+ artifacts : " build/app/outputs/apk/release/*,build/ios/iphoneos/app.ipa"
44+ tag : v1.0.${{ github.run_number }} # release tap will show in github,you can change what version you want
You can’t perform that action at this time.
0 commit comments