Skip to content

Commit 38065e1

Browse files
committed
for windows another file added
1 parent 1c98114 commit 38065e1

File tree

2 files changed

+122
-36
lines changed

2 files changed

+122
-36
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,54 +45,42 @@ jobs:
4545

4646
- run: flutter config --enable-android
4747
- run: flutter config --enable-ios
48-
- run: flutter config --enable-windows-desktop
4948
- run: flutter config --enable-web
5049
- run: flutter clean
5150
- run: flutter pub get
5251

53-
# # Flutter android apk build command.
54-
# - run: flutter build apk
55-
# - run: flutter build apk --split-per-abi
52+
# Flutter android apk build command.
53+
- run: flutter build apk
54+
- run: flutter build apk --split-per-abi
5655

57-
# # Flutter ios ipa build command.
58-
# - run: |
59-
# flutter build ios --no-codesign
60-
# cd build/ios/iphoneos
61-
# mkdir Payload
62-
# cd Payload
63-
# ln -s ../Runner.app
64-
# cd ..
65-
# zip -r app.ipa Payload
66-
67-
# Flutter windows build command.
56+
# Flutter ios ipa build command.
6857
- run: |
69-
flutter build windows
70-
cd build/windows/runner/Release
71-
mkdir Widnows_Setup
72-
cd Widnows_Setup
73-
ln -s ../Release/*
58+
flutter build ios --no-codesign
59+
cd build/ios/iphoneos
60+
mkdir Payload
61+
cd Payload
62+
ln -s ../Runner.app
7463
cd ..
75-
zip -r widnows_setup.zip Widnows_Setup
64+
zip -r app.ipa Payload
7665
77-
# # Flutter web release command.
78-
# - run: flutter build web --web-renderer html --release
79-
# - run: |
80-
# cd build/web
81-
# git init
82-
# git config --global user.email "$my_email"
83-
# git config --global user.name "$my_name"
84-
# git status
85-
# git remote add origin https://"$my_secret"@github.com/"$my_repo"
86-
# git checkout -b gh-pages
87-
# git add --all
88-
# git commit -m "update"
89-
# git push origin gh-pages -f
66+
# Flutter web release command.
67+
- run: flutter build web --web-renderer html --release
68+
- run: |
69+
cd build/web
70+
git init
71+
git config --global user.email "$my_email"
72+
git config --global user.name "$my_name"
73+
git status
74+
git remote add origin https://"$my_secret"@github.com/"$my_repo"
75+
git checkout -b gh-pages
76+
git add --all
77+
git commit -m "update"
78+
git push origin gh-pages -f
9079
9180
# Upload assets to release
9281
- name: Push to Release
9382
uses: ncipollo/release-action@v1
9483
with:
95-
artifacts: "build/windows/runner/widnows_setup.zip"
96-
# artifacts: "build/app/outputs/flutter-apk/*,build/ios/iphoneos/app.ipa"
84+
artifacts: "build/app/outputs/flutter-apk/*,build/ios/iphoneos/app.ipa"
9785
tag: ${{env.my_tag}}
9886
token: ${{env.my_secret}}

z_windows.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Android, iOS, Web Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: Android, iOS, Web Build
11+
12+
env:
13+
my_repo: "sabikrahat/github_workflow_flutter_project.git"
14+
my_secret: "${{secrets.WORKFLOW_TOKEN}}"
15+
my_email: "sabikrahat72428@gmail.com"
16+
my_name: "Md. Sabik Alam Rahat"
17+
my_tag: "v1.0.${{github.run_number}}"
18+
19+
# This job will run on macos virtual machine
20+
runs-on: macos-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v3
25+
26+
- run: |
27+
echo "Your Repo is $my_repo"
28+
echo "Your secrect token is $my_secret"
29+
echo "Your email is $my_email"
30+
echo "Your name is $my_name"
31+
32+
# Setup Java environment.
33+
- name: Setup Java
34+
uses: actions/setup-java@v3
35+
with:
36+
distribution: "zulu"
37+
java-version: "18.x"
38+
39+
# Setup the flutter environment.
40+
- name: Setup Flutter
41+
uses: subosito/flutter-action@v2
42+
with:
43+
channel: stable
44+
flutter-version: "3.3.2"
45+
46+
- run: flutter config --enable-android
47+
- run: flutter config --enable-ios
48+
- run: flutter config --enable-windows-desktop
49+
- run: flutter config --enable-web
50+
- run: flutter clean
51+
- run: flutter pub get
52+
53+
# # Flutter android apk build command.
54+
# - run: flutter build apk
55+
# - run: flutter build apk --split-per-abi
56+
57+
# # Flutter ios ipa build command.
58+
# - run: |
59+
# flutter build ios --no-codesign
60+
# cd build/ios/iphoneos
61+
# mkdir Payload
62+
# cd Payload
63+
# ln -s ../Runner.app
64+
# cd ..
65+
# zip -r app.ipa Payload
66+
67+
# Flutter windows build command.
68+
- run: |
69+
flutter build windows
70+
cd build/windows/runner/Release
71+
mkdir Widnows_Setup
72+
cd Widnows_Setup
73+
ln -s ../Release/*
74+
cd ..
75+
zip -r widnows_setup.zip Widnows_Setup
76+
77+
# # Flutter web release command.
78+
# - run: flutter build web --web-renderer html --release
79+
# - run: |
80+
# cd build/web
81+
# git init
82+
# git config --global user.email "$my_email"
83+
# git config --global user.name "$my_name"
84+
# git status
85+
# git remote add origin https://"$my_secret"@github.com/"$my_repo"
86+
# git checkout -b gh-pages
87+
# git add --all
88+
# git commit -m "update"
89+
# git push origin gh-pages -f
90+
91+
# Upload assets to release
92+
- name: Push to Release
93+
uses: ncipollo/release-action@v1
94+
with:
95+
artifacts: "build/windows/runner/widnows_setup.zip"
96+
# artifacts: "build/app/outputs/flutter-apk/*,build/ios/iphoneos/app.ipa"
97+
tag: ${{env.my_tag}}
98+
token: ${{env.my_secret}}

0 commit comments

Comments
 (0)