Skip to content

Commit 433dbe9

Browse files
committed
add fastlane basis etc
1 parent bfd4f17 commit 433dbe9

15 files changed

Lines changed: 543 additions & 20 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ jobs:
2929
- name: Set up Android SDK
3030
uses: android-actions/setup-android@v3
3131

32+
- name: Set up Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: "3.2"
36+
bundler-cache: true
37+
3238
- name: Resolve release version from repository
3339
id: version
3440
shell: bash
@@ -72,6 +78,9 @@ jobs:
7278
- name: Build signed release artifacts
7379
shell: bash
7480
env:
81+
SEENOT_VERSION_NAME: ${{ steps.version.outputs.version_name }}
82+
SEENOT_VERSION_CODE: ${{ steps.version.outputs.version_code }}
83+
RELEASE_STORE_FILE: ${{ runner.temp }}/release.keystore
7584
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
7685
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
7786
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
@@ -83,18 +92,9 @@ jobs:
8392
exit 1
8493
fi
8594
86-
chmod +x ./gradlew
87-
88-
./gradlew \
89-
:app:testReleaseUnitTest \
90-
:app:assembleRelease \
91-
:app:bundleRelease \
92-
-PSEENOT_VERSION_NAME="${{ steps.version.outputs.version_name }}" \
93-
-PSEENOT_VERSION_CODE="${{ steps.version.outputs.version_code }}" \
94-
-PRELEASE_STORE_FILE="$RUNNER_TEMP/release.keystore" \
95-
-PRELEASE_STORE_PASSWORD="${RELEASE_STORE_PASSWORD}" \
96-
-PRELEASE_KEY_ALIAS="${RELEASE_KEY_ALIAS}" \
97-
-PRELEASE_KEY_PASSWORD="${RELEASE_KEY_PASSWORD}"
95+
bundle exec fastlane android ci_release \
96+
version_name:"${SEENOT_VERSION_NAME}" \
97+
version_code:"${SEENOT_VERSION_CODE}"
9898
9999
- name: Upload workflow artifacts
100100
uses: actions/upload-artifact@v4
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Fastlane Metadata Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "fastlane/metadata/**"
7+
- "app/version.properties"
8+
- ".github/workflows/fastlane-metadata.yml"
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- "fastlane/metadata/**"
14+
- "app/version.properties"
15+
- ".github/workflows/fastlane-metadata.yml"
16+
workflow_dispatch:
17+
18+
jobs:
19+
validate:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Validate fastlane metadata schema
28+
uses: ashutoshgngwr/validate-fastlane-supply-metadata@v2
29+
with:
30+
fastlaneDir: fastlane

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,8 @@ ai-debugger/bin/
7171
.astro
7272
dist
7373
node_modules
74+
75+
# Ruby / fastlane
76+
.bundle/
77+
vendor/
78+
fastlane/report.xml

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"

Gemfile.lock

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.9)
5+
abbrev (0.1.2)
6+
addressable (2.9.0)
7+
public_suffix (>= 2.0.2, < 8.0)
8+
artifactory (3.0.17)
9+
atomos (0.1.3)
10+
aws-eventstream (1.3.2)
11+
aws-partitions (1.1109.0)
12+
aws-sdk-core (3.224.1)
13+
aws-eventstream (~> 1, >= 1.3.0)
14+
aws-partitions (~> 1, >= 1.992.0)
15+
aws-sigv4 (~> 1.9)
16+
base64
17+
jmespath (~> 1, >= 1.6.1)
18+
logger
19+
aws-sdk-kms (1.101.0)
20+
aws-sdk-core (~> 3, >= 3.216.0)
21+
aws-sigv4 (~> 1.5)
22+
aws-sdk-s3 (1.188.0)
23+
aws-sdk-core (~> 3, >= 3.224.1)
24+
aws-sdk-kms (~> 1)
25+
aws-sigv4 (~> 1.5)
26+
aws-sigv4 (1.11.0)
27+
aws-eventstream (~> 1, >= 1.0.2)
28+
babosa (1.0.4)
29+
base64 (0.2.0)
30+
claide (1.1.0)
31+
colored (1.2)
32+
colored2 (3.1.2)
33+
commander (4.6.0)
34+
highline (~> 2.0.0)
35+
csv (3.3.5)
36+
declarative (0.0.20)
37+
digest-crc (0.7.0)
38+
rake (>= 12.0.0, < 14.0.0)
39+
domain_name (0.5.20190701)
40+
unf (>= 0.0.5, < 1.0.0)
41+
dotenv (2.8.1)
42+
emoji_regex (3.2.3)
43+
excon (0.109.0)
44+
faraday (1.10.5)
45+
faraday-em_http (~> 1.0)
46+
faraday-em_synchrony (~> 1.0)
47+
faraday-excon (~> 1.1)
48+
faraday-httpclient (~> 1.0)
49+
faraday-multipart (~> 1.0)
50+
faraday-net_http (~> 1.0)
51+
faraday-net_http_persistent (~> 1.0)
52+
faraday-patron (~> 1.0)
53+
faraday-rack (~> 1.0)
54+
faraday-retry (~> 1.0)
55+
ruby2_keywords (>= 0.0.4)
56+
faraday-cookie_jar (0.0.8)
57+
faraday (>= 0.8.0)
58+
http-cookie (>= 1.0.0)
59+
faraday-em_http (1.0.0)
60+
faraday-em_synchrony (1.0.1)
61+
faraday-excon (1.1.0)
62+
faraday-httpclient (1.0.1)
63+
faraday-multipart (1.2.0)
64+
multipart-post (~> 2.0)
65+
faraday-net_http (1.0.2)
66+
faraday-net_http_persistent (1.2.0)
67+
faraday-patron (1.0.0)
68+
faraday-rack (1.0.0)
69+
faraday-retry (1.0.4)
70+
faraday_middleware (1.2.1)
71+
faraday (~> 1.0)
72+
fastimage (2.4.1)
73+
fastlane (2.230.0)
74+
CFPropertyList (>= 2.3, < 4.0.0)
75+
abbrev (~> 0.1.2)
76+
addressable (>= 2.8, < 3.0.0)
77+
artifactory (~> 3.0)
78+
aws-sdk-s3 (~> 1.0)
79+
babosa (>= 1.0.3, < 2.0.0)
80+
base64 (~> 0.2.0)
81+
bundler (>= 1.12.0, < 3.0.0)
82+
colored (~> 1.2)
83+
commander (~> 4.6)
84+
csv (~> 3.3)
85+
dotenv (>= 2.1.1, < 3.0.0)
86+
emoji_regex (>= 0.1, < 4.0)
87+
excon (>= 0.71.0, < 1.0.0)
88+
faraday (~> 1.0)
89+
faraday-cookie_jar (~> 0.0.6)
90+
faraday_middleware (~> 1.0)
91+
fastimage (>= 2.1.0, < 3.0.0)
92+
fastlane-sirp (>= 1.0.0)
93+
gh_inspector (>= 1.1.2, < 2.0.0)
94+
google-apis-androidpublisher_v3 (~> 0.3)
95+
google-apis-playcustomapp_v1 (~> 0.1)
96+
google-cloud-env (>= 1.6.0, < 2.0.0)
97+
google-cloud-storage (~> 1.31)
98+
highline (~> 2.0)
99+
http-cookie (~> 1.0.5)
100+
json (< 3.0.0)
101+
jwt (>= 2.1.0, < 3)
102+
logger (>= 1.6, < 2.0)
103+
mini_magick (>= 4.9.4, < 5.0.0)
104+
multipart-post (>= 2.0.0, < 3.0.0)
105+
mutex_m (~> 0.3.0)
106+
naturally (~> 2.2)
107+
nkf (~> 0.2.0)
108+
optparse (>= 0.1.1, < 1.0.0)
109+
plist (>= 3.1.0, < 4.0.0)
110+
rubyzip (>= 2.0.0, < 3.0.0)
111+
security (= 0.1.5)
112+
simctl (~> 1.6.3)
113+
terminal-notifier (>= 2.0.0, < 3.0.0)
114+
terminal-table (~> 3)
115+
tty-screen (>= 0.6.3, < 1.0.0)
116+
tty-spinner (>= 0.8.0, < 1.0.0)
117+
word_wrap (~> 1.0.0)
118+
xcodeproj (>= 1.13.0, < 2.0.0)
119+
xcpretty (~> 0.4.1)
120+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
121+
fastlane-sirp (1.1.0)
122+
gh_inspector (1.1.3)
123+
google-apis-androidpublisher_v3 (0.54.0)
124+
google-apis-core (>= 0.11.0, < 2.a)
125+
google-apis-core (0.11.3)
126+
addressable (~> 2.5, >= 2.5.1)
127+
googleauth (>= 0.16.2, < 2.a)
128+
httpclient (>= 2.8.1, < 3.a)
129+
mini_mime (~> 1.0)
130+
representable (~> 3.0)
131+
retriable (>= 2.0, < 4.a)
132+
rexml
133+
google-apis-iamcredentials_v1 (0.17.0)
134+
google-apis-core (>= 0.11.0, < 2.a)
135+
google-apis-playcustomapp_v1 (0.13.0)
136+
google-apis-core (>= 0.11.0, < 2.a)
137+
google-apis-storage_v1 (0.29.0)
138+
google-apis-core (>= 0.11.0, < 2.a)
139+
google-cloud-core (1.6.1)
140+
google-cloud-env (>= 1.0, < 3.a)
141+
google-cloud-errors (~> 1.0)
142+
google-cloud-env (1.6.0)
143+
faraday (>= 0.17.3, < 3.0)
144+
google-cloud-errors (1.3.1)
145+
google-cloud-storage (1.45.0)
146+
addressable (~> 2.8)
147+
digest-crc (~> 0.4)
148+
google-apis-iamcredentials_v1 (~> 0.1)
149+
google-apis-storage_v1 (~> 0.29.0)
150+
google-cloud-core (~> 1.6)
151+
googleauth (>= 0.16.2, < 2.a)
152+
mini_mime (~> 1.0)
153+
googleauth (1.8.1)
154+
faraday (>= 0.17.3, < 3.a)
155+
jwt (>= 1.4, < 3.0)
156+
multi_json (~> 1.11)
157+
os (>= 0.9, < 2.0)
158+
signet (>= 0.16, < 2.a)
159+
highline (2.0.3)
160+
http-cookie (1.0.8)
161+
domain_name (~> 0.5)
162+
httpclient (2.9.0)
163+
mutex_m
164+
jmespath (1.6.2)
165+
json (2.7.6)
166+
jwt (2.10.2)
167+
base64
168+
logger (1.7.0)
169+
mini_magick (4.13.2)
170+
mini_mime (1.1.5)
171+
multi_json (1.15.0)
172+
multipart-post (2.4.1)
173+
mutex_m (0.3.0)
174+
nanaimo (0.4.0)
175+
naturally (2.3.0)
176+
nkf (0.2.0)
177+
optparse (0.8.1)
178+
os (1.1.4)
179+
plist (3.7.2)
180+
public_suffix (5.1.1)
181+
rake (13.4.2)
182+
representable (3.2.0)
183+
declarative (< 0.1.0)
184+
trailblazer-option (>= 0.1.1, < 0.2.0)
185+
uber (< 0.2.0)
186+
retriable (3.4.1)
187+
rexml (3.4.4)
188+
rouge (3.28.0)
189+
ruby2_keywords (0.0.5)
190+
rubyzip (2.4.1)
191+
security (0.1.5)
192+
signet (0.18.0)
193+
addressable (~> 2.8)
194+
faraday (>= 0.17.5, < 3.a)
195+
jwt (>= 1.5, < 3.0)
196+
multi_json (~> 1.10)
197+
simctl (1.6.10)
198+
CFPropertyList
199+
naturally
200+
terminal-notifier (2.0.0)
201+
terminal-table (3.0.2)
202+
unicode-display_width (>= 1.1.1, < 3)
203+
trailblazer-option (0.1.2)
204+
tty-cursor (0.7.1)
205+
tty-screen (0.8.2)
206+
tty-spinner (0.9.3)
207+
tty-cursor (~> 0.7)
208+
uber (0.1.0)
209+
unf (0.2.0)
210+
unicode-display_width (2.6.0)
211+
word_wrap (1.0.0)
212+
xcodeproj (1.27.0)
213+
CFPropertyList (>= 2.3.3, < 4.0)
214+
atomos (~> 0.1.3)
215+
claide (>= 1.0.2, < 2.0)
216+
colored2 (~> 3.1)
217+
nanaimo (~> 0.4.0)
218+
rexml (>= 3.3.6, < 4.0)
219+
xcpretty (0.4.1)
220+
rouge (~> 3.28.0)
221+
xcpretty-travis-formatter (1.0.1)
222+
xcpretty (~> 0.2, >= 0.0.7)
223+
224+
PLATFORMS
225+
ruby
226+
227+
DEPENDENCIES
228+
fastlane
229+
230+
BUNDLED WITH
231+
1.17.2

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,30 @@ Or build from the command line:
8484
adb install app/build/outputs/apk/debug/app-debug.apk
8585
```
8686

87+
### Fastlane (build + metadata)
88+
89+
This repo now includes Fastlane support for Android release automation and
90+
IzzyOnDroid/F-Droid style metadata management.
91+
92+
Install dependencies:
93+
94+
```bash
95+
bundle install --path vendor/bundle
96+
```
97+
98+
Common commands:
99+
100+
```bash
101+
# Build debug APK
102+
bundle exec fastlane android build_debug
103+
104+
# Validate metadata files for current VERSION_CODE
105+
bundle exec fastlane android metadata_check
106+
107+
# Build signed release APK + AAB
108+
bundle exec fastlane android release
109+
```
110+
87111
---
88112

89113
## Project Structure

README.zh-CN.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,31 @@ cd seenot-app
8282
adb install app/build/outputs/apk/debug/app-debug.apk
8383
```
8484

85+
### Fastlane(构建 + Metadata)
86+
87+
仓库已加入 Fastlane,用于统一 Android 发版构建流程,以及维护
88+
IzzyOnDroid/F-Droid 风格的 metadata 文件。
89+
90+
先安装依赖:
91+
92+
```bash
93+
bundle install --path vendor/bundle
94+
```
95+
96+
常用命令:
97+
98+
```bash
99+
# 构建 Debug APK
100+
bundle exec fastlane android build_debug
101+
102+
# 校验当前 VERSION_CODE 对应的 metadata
103+
bundle exec fastlane android metadata_check
104+
105+
# 构建已签名 Release APK + AAB
106+
# 默认从 local.properties 读取签名参数。
107+
bundle exec fastlane android release
108+
```
109+
85110
---
86111

87112
## 项目结构

0 commit comments

Comments
 (0)