Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flutter開発とGitHub Actions
Search
yorifuji
October 26, 2023
Programming
370
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flutter開発とGitHub Actions
yorifuji
October 26, 2023
More Decks by yorifuji
See All by yorifuji
Codex の「自走力」を高める
yorifuji
0
1.6k
GitHub Actionsのカスタムアクションを公開する
yorifuji
0
350
GitHub Actionsのカスタムアクションを作成してMarketplaceで公開した話
yorifuji
0
240
iOSアプリ開発でGitHub Actionsのself-hosted runnerを使う
yorifuji
1
1.9k
Other Decks in Programming
See All in Programming
typoなんかねぇよ
raspython3
0
660
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
430
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
450
[KotlinConf Extended South Korea 2026] KotlinConf 2026 발표자 후기
wisemuji
0
100
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
150
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
54
36k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
自分的「カンファレンスの楽しみ方」
syumai
0
190
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
860
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
WENDY [Excerpt]
tessaabrams
12
39k
Agile that works and the tools we love
rasmusluckow
331
22k
Git: the NoSQL Database
bkeepers
PRO
432
67k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Limits of Empathy - UXLibs8
cassininazir
1
640
Building Applications with DynamoDB
mza
96
7.2k
How to build a perfect <img>
jonoalderson
1
6k
Technical Leadership for Architectural Decision Making
baasie
3
550
Transcript
Flutter։ൃͱGitHub Actions YORIFUJI MITSUNORI ORION SALON #31
ࣗݾհ • YORIFUJI MITSUNORI • @yorifuji on X/GitHub/Zenn • ۚ༥ܥελʔτΞοϓͷiOSΤϯδχΞ
CIαʔϏεઓࠃ࣌ʁ
GitHub Actions https://github.co.jp/features/actions
GitHub ActionsͰࣗಈԽ͍ͯ͠Δ࡞ۀ • Check(formatter/lint) • fl utter format • fl
utter analyze • Test • Unit/Widget/Integration Test • VRT(Visual Regression Test) • Build & Deploy • Staging(Firebase App Distribution) • Production(Google Play, App Store) • Bump up • pubspec.yml ͷ versionߋ৽&PR࡞ • Nightly build
FlutterͷCIڥͱͯ͠ GitHub ActionsΛ ࠾༻͢Δཧ༝Λߟ͑ͯΈͨ
ਪ͠ཁૉΛϦετΞοϓʂ GitHub Actionsͷ͓͢͢ΊϙΠϯτ • GitHubʹଐ͍ͯ͠ΔͷͰ͙͢ʹ͍࢝ΊΒΕΔ • GitHubͰൃੜ͢ΔΠϕϯτ͕ར༻Ͱ͖Δ • ύϒϦοΫϦϙδτϦແྉɺຖ݄Ұఆͷແྉ͋Γ •
αʔυύʔςΟʔͷΞΫγϣϯ͕๛ • ΧελϚΠζੑ͕ߴ͍ • ແྉϓϥϯͰ࠷େ20ฒྻ·Ͱδϣϒ͕࣮ߦͰ͖Δ • Self-hosted runner͕͑Δ • VSCode Extension͕ศར • υΩϡϝϯτ͕๛ɺຊޠ༁͋Γ Flutter։ൃͰͷ͓͢͢ΊϙΠϯτ • FlutterSDKͷΠϯετʔϧ͕؆୯ • ϫʔΫϑϩʔλʔήοτʹ߹ΘͤͯRunnerͷ͍ ͚͕Ͱ͖Δ • ։ൃڥʢXcodeͳͲʣෳόʔδϣϯ͕Πϯε τʔϧࡁΈ • Windows, Linux, macOSΛͬͯϏϧυͰ͖Δ • ෳͷJobΛฒྻʹಉ࣮࣌ߦͰ͖Δ • CheckAndroidͱiOSͷ build & deploy
Ұ͚ͭͩڍ͛Δͱͨ͠Β
ύϒϦοΫϦϙδτϦແྉɺຖ݄Ұఆͷແྉ͋Γ
GitHubͰൃੜ͢ΔΠϕϯτͱͷ࿈ܞ • ଞͷCIαʔϏεͰPUSHɾPRɾTagͳͲͷGitʹؔ͢ΔτϦΨʔΛαϙʔτ • GitHub ActionsͰGitHubͰൃੜ͢ΔΠϕϯτΛϫʔΫϑϩʔʢδϣϒʣ࣮ߦͷ τϦΨʔʹ͢Δ͜ͱ͕Ͱ͖Δ • ྫɿIssuePRʹ༰ʹ߹ΘͤͯLabelΛ͚ͭΔ •
GitHub ActionsςετϏϧυ͚ͩͰͳ͘։ൃϓϩηεશମͰར༻Ͱ͖Δ
GitHub-hosted runner • GitHub-hosted runnerGitHub͕ඪ४Ͱఏڙ͍ͯ͠ΔCIͷ࣮ߦڥʢVMʣ • Windows, Linux(ubuntu), macOS͔ΒબՄೳ •
macOSMonterey, Ventura͕ఏڙ͞Ε͍ͯΔ • GitHub͕ӡ༻ཧ͍ͯ͠ΔͨΊࣗͰϝϯςφϯεෆཁ • δϣϒͷ࣮ߦ୯ҐͰ·ͬ͞ΒͳΠϯελϯεׂ͕ΓͯΒΕΔ • ୯ҐͰ՝ۚ • macOS࠷͍҆Linuxͷ10ഒͷஈ͕͢ΔͷͰదࡐదॴͰ͍͚͢Δ
ࢀߟɿGitHub-hosted runnerͷιϑτΣΞͷߏ • CIڥʹΠϯετʔϧ͞Ε͍ͯΔιϑτͷҰཡͳͲGitHub্Ͱެ։͞Ε͍ͯΔ • https://github.com/actions/runner-images (2023.10.8࣌)
Self-hosted runner • ϓϥΠϕʔτϦϙδτϦͰGitHub-hosted runnerͰmacOSΛ͏ͱར༻͕࣌ؒ x10 ࢉͷͨΊແྉ ͷফඅ͕ૣ͍ • Self-hosted
runnerॴ༗͍ͯ͠ΔϚγϯͰGitHub ActionsͷϫʔΫϑϩʔ࣮ߦ͢ΔγεςϜ • ϝϦοτ • ϓϥΠϕʔτϦϙδτϦͰRunnerͷར༻࣌ؒʹର͢Δྉ͕ۚൃੜ͠ͳ͍ • σϝϦοτ • Ϛγϯͷཧɾӡ༻ίετશͯࣗෲʢOSπʔϧͷΞοϓσʔτɺ௨৴අ༻ͳͲʣ • GitHub-hostedͱҟͳΓඪ४ͰVMͷػೳ͕ఏڙ͞Ε͍ͯͳ͍ͷͰΰϛ͕ͬͨΓ͢Δ -
FlutterͷϏϧυڥͷηοτΞοϓ • GitHub͕ఏڙ͢ΔRunnerʹFlutter SDK͕Πϯετʔϧ͞Ε͍ͯͳ͍ • ςετϏϧυΛߦ͏ͨΊʹSDKͷΠϯετʔϧ͕ඞཁ • third-partyͷΞΫγϣϯ͕͋Δ • https://github.com/marketplace/actions/
fl utter-action • Git͔Βclone • XcodeAndroid SDKͳͲෳόʔδϣϯ͕ΠϯετʔϧࡁΈͰΓସ͑؆୯ • XcodeͳΒڥม DEVELOPER_DIR ͰΓସ͑Մೳ
ϫʔΫϑϩʔͷతͰRunnerΛΓସ͑Δ • ੩తղੳʢ fl utter analyzeʣςετɺϏϧυ&σϓϩΠͰར༻͢Δ έʔε • ੩తղੳςετ࠷͍҆LinuxͰ࣮ߦ •
ϏϧυAndroidWebͳΒLinuxɺiOSmacOS • ϫʔΫϑϩʔϏϧυλʔήοτʹ߹ΘͤͯRunnerΛ͍͚Δ͜ ͱͰඅ༻ΛίϯτϩʔϧͰ͖Δ
ϫʔΫϑϩʔͷ࠶ར༻ੑ͕ߴ͍ • GitHub ActionsͷϫʔΫϑϩʔͷఆٛyamlϑΝΠϧͳͷͰ࠶ར༻ੑ͕ߴ͍ • ৽͍͠ϓϩδΣΫτΛ։࢝ͨ͠ΒطଘͷϑΝΠϧΛίϐʔ͢Δ͚ͩCI/CDͷ ηοτΞοϓ͕ྃ͢Δ • GUIͷϫʔΫϑϩʔΤσΟλΛϙνϙν͠ͳͯ͘ྑ͍ʢҰҰʣ
ϫʔΫϑϩʔͷΧελϚΠζੑ͕ߴ͍ • CIδϣϒͷதͰJavaScriptΛͬͯॲཧΛهड़Ͱ͖Δ • https://github.com/actions/github-script • Job Summaries • ϫʔΫϑϩʔͷ࣮ߦ݁Ռͷը໘ʹMarkdownܗࣜͳͲͰग़ྗͰ͖Δ
reg-suitΛͬͨVRTʢVisual Regression Testʣ
ࢀߟɿreg-suitͷαϚϦʔΛJob Summariesʹग़ྗ - name: Generate Comment uses: actions/github-script@v6 with: script:
| const fs = require('fs'); ʢ్தলུʣ await core.summary .addHeading(`${icon} reg-suit has checked for visual changes`, 3) .addTable([ ["🔴 Changed", "🟡 New", "⚫ Deleted", "🔵 Passing"], [stats.changed, stats.newItems, stats.deleted, stats.passing] ]) .addHeading("📝 Log", 3) .addCodeBlock(log, "log") .write()
GitHub Actionsͷrunsʢ࣮ߦϩάʣͷϖʔδʹදࣔ͞Εͨ༰
ࠓޙͷվળΛظ͢ΔϙΠϯτ • ϑΝΠϧΞοϓϩʔμʔػೳ • iOSΞϓϦͷϏϧυͰ֤छূ໌ॻProvisioning Pro fi le͕ඞཁ • GitHub
ActionsϑΝΠϧΞοϓϩʔμʔ͕ఏڙ͞Ε͍ͯͳ͍ • ϑΝΠϧΛbase64ʹมͯ͠secretʹొ -> CIδϣϒͷதͰϑΝΠϧʹॻ ͖ग़͢࡞ۀ͕ඞཁ • BitriseͳͲϑΝΠϧΞοϓϩʔυػೳ͔ΒΞοϓϩʔυ͕Ͱ͖Δ • σόοάͯ͘͢͠͠΄͍͠
۩ମతͳϫʔΫϑϩʔͷྫͪ͜ΒͷهࣄΛࢀߟʹ🙏 https://zenn.dev/yorifuji
͋Γ͕ͱ͏͍͟͝·ͨ͠