Skip to content

Commit 4ca695d

Browse files
committed
Merge branch 'master' of github.com:hmziqrs/flutter-ui-designs
2 parents ba9aab7 + db9e3b4 commit 4ca695d

File tree

9 files changed

+364
-540
lines changed

9 files changed

+364
-540
lines changed

.github/workflows/android.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
name: Android build and release
7+
jobs:
8+
build:
9+
name: Android build
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
steps:
16+
- name: Cache Gradle files
17+
uses: actions/cache@v3
18+
with:
19+
path: |
20+
~/.gradle/caches
21+
~/.gradle/wrapper
22+
key: ${{ runner.os }}-gradle-${{ hashFiles('app/**/*.gradle*', 'app/**/gradle-wrapper.properties') }}
23+
restore-keys: |
24+
${{ runner.os }}-gradle-
25+
26+
- name: Set up Flutter
27+
uses: subosito/flutter-action@v2
28+
with:
29+
flutter-version: "3.24.5"
30+
channel: "stable"
31+
cache: true
32+
33+
- name: Cache pub dependencies
34+
uses: actions/cache@v3
35+
with:
36+
path: |
37+
${{ env.PUB_CACHE }}
38+
app/.dart_tool
39+
key: ${{ runner.os }}-pub-${{ hashFiles('app/**/pubspec.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-pub-
42+
43+
- uses: actions/setup-java@v4
44+
with:
45+
java-version: "17"
46+
distribution: "oracle"
47+
48+
- uses: actions/checkout@v4
49+
with:
50+
path: "app"
51+
52+
- uses: actions/checkout@v4
53+
with:
54+
repository: "hmziqrs/keys-n-stuff"
55+
path: "app/.keys-n-stuff"
56+
token: ${{ secrets.TOKEN }}
57+
58+
- name: Execute Keys n Stuff
59+
run: |
60+
cd app
61+
dart ./scripts/keys-n-stuff.dart
62+
- name: Install pub dependencies
63+
run: cd app && flutter pub get
64+
- name: Sync android version
65+
run: cd app && dart scripts/version_sync.dart
66+
- run: |
67+
cd app
68+
flutter build apk -t lib/main.firebase.dart --release
69+
flutter build appbundle -t lib/main.firebase.dart --release
70+
71+
- name: Create Android release
72+
uses: ncipollo/release-action@v1
73+
with:
74+
artifacts: |
75+
app/build/app/outputs/apk/release/app-release.apk
76+
app/build/app/outputs/bundle/release/app-release.aab
77+
token: ${{ secrets.TOKEN }}
78+
allowUpdates: true
79+
80+
- uses: actions/upload-artifact@v4
81+
with:
82+
name: "app-release.aab"
83+
path: "app/build/app/outputs/bundle/release/app-release.aab"
84+
- uses: actions/upload-artifact@v4
85+
with:
86+
name: "app-release.apk"
87+
path: "app/build/app/outputs/apk/release/app-release.apk"
88+
89+
release:
90+
name: Android release
91+
needs: build
92+
runs-on: ubuntu-latest
93+
permissions:
94+
contents: read
95+
pages: write
96+
id-token: write
97+
steps:
98+
- uses: actions/checkout@v4
99+
with:
100+
repository: "hmziqrs/keys-n-stuff"
101+
path: "keys"
102+
token: ${{ secrets.TOKEN }}
103+
104+
- uses: actions/download-artifact@v4
105+
with:
106+
name: app-release.aab
107+
path: artifacts
108+
- run: ls -lah
109+
- run: ls -lah keys/
110+
- run: ls -lah keys/fuid
111+
- run: ls -lah artifacts
112+
- run: ls -lah artifacts/app-release.aab
113+
- name: Upload app bundle to Google Play
114+
uses: r0adkll/upload-google-play@v1
115+
with:
116+
serviceAccountJson: "keys/fuid/service-account.json"
117+
packageName: "com.onemdev.flutter_ui_challenges"
118+
releaseFiles: "artifacts/*.aab"
119+
track: "beta"
120+
inAppUpdatePriority: 3
121+
status: completed

.github/workflows/linux.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
name: Linux build and release
7+
jobs:
8+
linux:
9+
name: Linux
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set up Flutter
13+
uses: subosito/flutter-action@v2
14+
with:
15+
cache: true
16+
flutter-version: "3.24.5"
17+
channel: "stable"
18+
19+
- uses: actions/checkout@v4
20+
with:
21+
path: "app"
22+
23+
- name: Cache pub dependencies
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
${{ env.PUB_CACHE }}
28+
app/.dart_tool
29+
key: ${{ runner.os }}-pub-${{ hashFiles('app/**/pubspec.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-pub-
32+
33+
- name: Install required build tools for linux
34+
run: |
35+
sudo apt-get update -y
36+
sudo apt-get upgrade -y
37+
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
38+
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
39+
40+
- run: |
41+
cd app
42+
flutter config --enable-linux-desktop
43+
flutter pub get
44+
flutter build linux --release
45+
cd build/linux/x64/release
46+
zip -r linux-release.zip bundle
47+
48+
- name: Create linux Release
49+
uses: ncipollo/release-action@v1
50+
with:
51+
artifacts: "app/build/linux/x64/release/linux-release.zip"
52+
token: ${{ secrets.TOKEN }}
53+
allowUpdates: true

.github/workflows/macos.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
name: MacOS build and release
7+
jobs:
8+
macos:
9+
name: MacOS
10+
runs-on: macos-latest
11+
steps:
12+
- name: Set up Flutter
13+
uses: subosito/flutter-action@v2
14+
with:
15+
cache: true
16+
flutter-version: "3.22.2"
17+
channel: "stable"
18+
19+
- uses: actions/checkout@v4
20+
with:
21+
path: "app"
22+
23+
- name: Cache pub dependencies
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
${{ env.PUB_CACHE }}
28+
app/.dart_tool
29+
key: ${{ runner.os }}-pub-${{ hashFiles('app/**/pubspec.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-pub-
32+
33+
- uses: actions/checkout@v4
34+
with:
35+
repository: "hmziqrs/keys-n-stuff"
36+
path: "app/.keys-n-stuff"
37+
token: ${{ secrets.TOKEN }}
38+
39+
- name: Execute Keys n Stuff
40+
run: |
41+
cd app
42+
dart ./scripts/keys-n-stuff.dart
43+
44+
- run: |
45+
cd app
46+
flutter config --enable-macos-desktop
47+
flutter pub global activate flutterfire_cli
48+
flutter pub get
49+
flutter build macos -t lib/main.firebase.dart --release
50+
cd build/macos/Build/Products/Release
51+
ditto -c -k --sequesterRsrc --keepParent flutter_uis.app macos-release.zip
52+
53+
- uses: ncipollo/release-action@v1
54+
with:
55+
artifacts: "app/build/macOS/Build/Products/Release/macos-release.zip"
56+
token: ${{ secrets.TOKEN }}
57+
allowUpdates: true

0 commit comments

Comments
 (0)