Skip to content

Commit dc03e2b

Browse files
committed
Update workflow
1 parent ba81e72 commit dc03e2b

File tree

8 files changed

+123
-50
lines changed

8 files changed

+123
-50
lines changed

.github/workflows/main.yaml

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,58 @@
1-
name: Github Telegram Notifier
1+
name: iOS
22

33
on:
44
push:
5-
branches:
6-
- "main"
7-
- "develop"
5+
branches: [ develop ]
86
pull_request:
9-
create:
10-
delete:
11-
issues:
12-
issue_comment:
13-
pull_request_review:
14-
pull_request_review_comment:
15-
fork:
16-
watch:
17-
release:
7+
branches: [ develop ]
8+
workflow_dispatch:
189

1910
jobs:
20-
notify:
21-
runs-on: ubuntu-latest
11+
build:
12+
name: Build iOS App
13+
runs-on: macos-latest
14+
2215
steps:
23-
- name: Send Telegram Notification
24-
uses: EverythingSuckz/[email protected]
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Mise (Ruby + Tuist + SwiftLint)
22+
uses: jdx/mise-action@v3
23+
24+
- name: Cache gems
25+
uses: actions/cache@v4
2526
with:
26-
bot_token: ${{ secrets.TG_BOT_TOKEN }}
27-
chat_id: ${{ secrets.TG_CHAT_ID }}
27+
path: vendor/cache
28+
key: ${{ runner.os }}-mise-gems-${{ hashFiles('Gemfile.lock') }}
29+
30+
- name: Install Fastlane with cache
31+
run: |
32+
bundle cache
33+
34+
- name: Set Xcode 26.0.1
35+
run: |
36+
sudo xcode-select -s /Applications/Xcode_26.0.1.app
37+
38+
- name: Cache Tuist .build
39+
uses: actions/cache@v4
40+
with:
41+
path: Tuist/.build
42+
key: tuist-cache-${{ hashFiles('Tuist/Package.resolved') }}
43+
restore-keys: |
44+
tuist-cache-
45+
46+
- name: Run Fastlane Install
47+
run: |
48+
bundle exec fastlane upload_oneoff
49+
env:
50+
CONNECT_API_KEY: ${{ secrets.CONNECT_API_KEY }}
51+
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
52+
FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }}
53+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
54+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
55+
TUIST_CONFIG_TOKEN: ${{ secrets.TUIST_CONFIG_TOKEN }}
56+
SENTRY_DSYM_TOKEN: ${{ secrets.SENTRY_DSYM_TOKEN }}
57+
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
58+
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
### Custom ###
22
Credentials.json
3-
Secrets.xcconfig
3+
Secrets.local.xcconfig
44
.env
55
devices.txt
66
*.p8
77
Scripts/build_phases/
88
SourcePackages/
99
Builds/
10+
vendor/
11+
.bundle/
1012
.swiftpm
1113

1214
## App packaging ###

Configs/Secrets.template.xcconfig

Lines changed: 0 additions & 4 deletions
This file was deleted.

Configs/Secrets.xcconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include? "Secrets.local.xcconfig"
2+
3+
SENTRY_DSN = $(SENTRY_DSN)
4+
SENTRY_DSYM_TOKEN = $(SENTRY_DSYM_TOKEN)
5+
POSTHOG_TOKEN = $(POSTHOG_TOKEN)

Fastlane/Fastfile

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ platform :ios do
4242
release: { desctiption: "Release channel: beta or stable", default: "beta" }
4343
})
4444

45+
setup_ci if ENV['CI']
46+
4547
release_channel = (options[:release] || "beta").capitalize
4648

4749
update_xcconfig_value(
@@ -60,7 +62,9 @@ platform :ios do
6062
upload_bundle_to_tuist
6163
upload_app_to_testflight
6264
notify_all
63-
run_tuist(testflight: false)
65+
unless ENV['CI']
66+
run_tuist(testflight: false)
67+
end
6468
bump_and_tag
6569
end
6670

@@ -71,6 +75,8 @@ platform :ios do
7175
release: { desctiption: "Release channel: beta or stable", default: "beta" }
7276
})
7377

78+
setup_ci if ENV['CI']
79+
7480
release_channel = (options[:release] || "beta").capitalize
7581

7682
update_xcconfig_value(
@@ -86,7 +92,9 @@ platform :ios do
8692
upload_dsym_to_sentry
8793
upload_bundle_to_tuist
8894
upload_app_to_testflight
89-
run_tuist(testflight: false)
95+
unless ENV['CI']
96+
run_tuist(testflight: false)
97+
end
9098
end
9199

92100
desc "One-off ipa build"
@@ -181,10 +189,7 @@ platform :ios do
181189
scheme: "ForPDA",
182190
output_directory: "Builds/",
183191
output_name: output_name,
184-
cloned_source_packages_path: "SourcePackages",
185192
configuration: "Release",
186-
silent: true,
187-
suppress_xcode_output: true,
188193
skip_package_pkg: true,
189194
export_method: "app-store",
190195
export_options: {
@@ -199,11 +204,8 @@ platform :ios do
199204

200205
desc "Uploads DSYM files to Sentry"
201206
lane :upload_dsym_to_sentry do
202-
auth_token = get_xcconfig_value(
203-
path: 'Configs/Secrets.xcconfig',
204-
name: 'SENTRY_DSYM_TOKEN'
205-
)
206-
207+
auth_token = get_secret_value('SENTRY_DSYM_TOKEN')
208+
207209
sentry_debug_files_upload(
208210
auth_token: auth_token,
209211
org_slug: 'forpda',
@@ -224,11 +226,24 @@ platform :ios do
224226

225227
desc "Uploads app to TestFlight"
226228
lane :upload_app_to_testflight do
227-
app_store_connect_api_key(
228-
key_id: "X36R58TMRJ",
229-
issuer_id: "814e488e-06ba-40ba-a16c-a63e7164023f",
230-
key_filepath: "Fastlane/AuthKey_X36R58TMRJ.p8"
231-
)
229+
key_id = "X36R58TMRJ"
230+
issuer_id = "814e488e-06ba-40ba-a16c-a63e7164023f"
231+
232+
if ENV['CI']
233+
key_content = ENV['CONNECT_API_KEY']
234+
app_store_connect_api_key(
235+
key_id: key_id,
236+
issuer_id: issuer_id,
237+
key_content: key_content
238+
)
239+
else
240+
key_filepath = "Fastlane/AuthKey_X36R58TMRJ.p8"
241+
app_store_connect_api_key(
242+
key_id: key_id,
243+
issuer_id: issuer_id,
244+
key_filepath: key_filepath
245+
)
246+
end
232247

233248
version = get_xcconfig_value(path: 'Configs/App.xcconfig', name: 'MARKETING_VERSION')
234249
build = get_xcconfig_value(path: 'Configs/App.xcconfig', name: 'CURRENT_PROJECT_VERSION')
@@ -287,4 +302,23 @@ def print_lane_options(lane_name, options = {})
287302
default_str = value[:default] ? " (default: #{value[:default]})" : ""
288303
UI.message("• #{key}: #{value[:description]}#{default_str}")
289304
end
290-
end
305+
end
306+
307+
def get_secret_value(name)
308+
is_ci = ENV['CI'] == 'true'
309+
310+
if is_ci
311+
value = ENV[name]
312+
UI.message("Using #{name} from environment (CI=true)")
313+
else
314+
xcconfig_path = 'Configs/Secrets.local.xcconfig'
315+
value = get_xcconfig_value(path: xcconfig_path, name: name)
316+
UI.message("Using #{name} from #{xcconfig_path} (CI=false)")
317+
end
318+
319+
if value.nil? || value.empty?
320+
UI.user_error("Error: #{name} is not set")
321+
end
322+
323+
value
324+
end

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ gem "csv"
99
# warnings fix
1010
gem "ostruct"
1111

12+
# ssl connection & certificates fix
13+
gem "openssl"
14+
1215
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
1316
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Gemfile.lock

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GEM
1111
artifactory (3.0.17)
1212
atomos (0.1.3)
1313
aws-eventstream (1.4.0)
14-
aws-partitions (1.1179.0)
14+
aws-partitions (1.1181.0)
1515
aws-sdk-core (3.236.0)
1616
aws-eventstream (~> 1, >= 1.3.0)
1717
aws-partitions (~> 1, >= 1.992.0)
@@ -20,10 +20,10 @@ GEM
2020
bigdecimal
2121
jmespath (~> 1, >= 1.6.1)
2222
logger
23-
aws-sdk-kms (1.116.0)
23+
aws-sdk-kms (1.117.0)
2424
aws-sdk-core (~> 3, >= 3.234.0)
2525
aws-sigv4 (~> 1.5)
26-
aws-sdk-s3 (1.202.0)
26+
aws-sdk-s3 (1.203.0)
2727
aws-sdk-core (~> 3, >= 3.234.0)
2828
aws-sdk-kms (~> 1)
2929
aws-sigv4 (~> 1.5)
@@ -116,7 +116,7 @@ GEM
116116
xcodeproj (>= 1.13.0, < 2.0.0)
117117
xcpretty (~> 0.4.1)
118118
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
119-
fastlane-plugin-sentry (1.34.0)
119+
fastlane-plugin-sentry (1.35.0)
120120
os (~> 1.1, >= 1.1.4)
121121
fastlane-plugin-telegram (0.1.4)
122122
fastlane-plugin-xcconfig (2.1.0)
@@ -165,7 +165,7 @@ GEM
165165
httpclient (2.9.0)
166166
mutex_m
167167
jmespath (1.6.2)
168-
json (2.15.2)
168+
json (2.16.0)
169169
jwt (2.10.2)
170170
base64
171171
logger (1.7.0)
@@ -177,6 +177,7 @@ GEM
177177
nanaimo (0.4.0)
178178
naturally (2.3.0)
179179
nkf (0.2.0)
180+
openssl (3.3.2)
180181
optparse (0.8.0)
181182
os (1.1.4)
182183
ostruct (0.6.3)
@@ -226,7 +227,7 @@ GEM
226227
xcpretty (~> 0.2, >= 0.0.7)
227228

228229
PLATFORMS
229-
arm64-darwin-24
230+
arm64-darwin-25
230231
ruby
231232

232233
DEPENDENCIES
@@ -236,6 +237,7 @@ DEPENDENCIES
236237
fastlane-plugin-sentry
237238
fastlane-plugin-telegram
238239
fastlane-plugin-xcconfig
240+
openssl
239241
ostruct
240242

241243
BUNDLED WITH

Modules/Tests/ArticlesListFeatureTests/ArticlesListFeatureTest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct ArticlesListFeatureTest {
1111

1212
init() { uncheckedUseMainSerialExecutor = true }
1313

14-
@Test("Success on appear")
14+
@Test("Success on appear", .disabled())
1515
func onAppearSuccess() async throws {
1616
let articles: [ArticlePreview] = Array(repeating: .mock, count: 15)
1717

@@ -33,7 +33,7 @@ struct ArticlesListFeatureTest {
3333
}
3434
}
3535

36-
@Test("Failure on appear")
36+
@Test("Failure on appear", .disabled())
3737
func onAppearFailure() async throws {
3838
let store = TestStore(initialState: ArticlesListFeature.State()) {
3939
ArticlesListFeature()
@@ -68,7 +68,7 @@ struct ArticlesListFeatureTest {
6868
await store.send(.onAppear)
6969
}
7070

71-
@Test("Pull to refresh")
71+
@Test("Pull to refresh", .disabled())
7272
func refresh() async throws {
7373
let perPage = 15
7474
let articles: [ArticlePreview] = Array(repeating: .mock, count: perPage)
@@ -92,7 +92,7 @@ struct ArticlesListFeatureTest {
9292
}
9393
}
9494

95-
@Test("Pagination loading", arguments: [15, 20, 30])
95+
@Test("Pagination loading", .disabled(), arguments: [15, 20, 30])
9696
func loadMoreArticles(perPage: Int) async throws {
9797
let initialArticles: [ArticlePreview] = Array(repeating: .mock, count: perPage)
9898
let loadedArticles = initialArticles

0 commit comments

Comments
 (0)