Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flutter開発とGitHub Actions
Search
yorifuji
October 26, 2023
Programming
380
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.7k
GitHub Actionsのカスタムアクションを公開する
yorifuji
0
350
GitHub Actionsのカスタムアクションを作成してMarketplaceで公開した話
yorifuji
0
250
iOSアプリ開発でGitHub Actionsのself-hosted runnerを使う
yorifuji
1
1.9k
Other Decks in Programming
See All in Programming
JIS keyboard support in Omarchy
lef237
0
110
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
880
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
golang-bob.pdf
iwatsukayura
0
130
Next.js: The final boss of Web Performance
guaca
0
250
R8 の設定見直しでアプリサイズ削減
andpad
0
220
ジョジョの世界をXRで再現する
mofurune
0
160
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
First, design no harm
axbom
PRO
2
1.3k
Practical Orchestrator
shlominoach
192
12k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
450
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Balancing Empowerment & Direction
lara
6
1.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
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
͋Γ͕ͱ͏͍͟͝·ͨ͠