@@ -137,7 +137,17 @@ jobs:
137137 name : apk-x86_64-build-legacy
138138 path : app/linwood-butterfly-android-x86_64-legacy.apk
139139 build-windows :
140- runs-on : windows-2025
140+ strategy :
141+ fail-fast : false
142+ matrix :
143+ arch :
144+ - image : windows-2025
145+ name : x86_64
146+ dir : x64
147+ - image : windows-11-arm
148+ name : arm64
149+ dir : arm64
150+ runs-on : ${{ matrix.arch.image }}
141151 defaults :
142152 run :
143153 working-directory : app
@@ -155,7 +165,10 @@ jobs:
155165 - uses : subosito/flutter-action@v2.23.0
156166 with :
157167 flutter-version-file : app/pubspec.yaml
168+ channel : " master"
158169 cache : true
170+ cache-key : " flutter-:os:-:channel:-:version:-:arch:-:hash:"
171+ cache-path : " ${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
159172 - name : ✅ Enable platforms
160173 run : flutter config --enable-windows-desktop
161174 - name : 📦 Get dependencies
@@ -175,24 +188,23 @@ jobs:
175188 shell : pwsh
176189 run : |
177190 Get-Content pubspec.yaml | Select-String -Pattern 'version:\s(.+)\+' | % {Set-Item -Path Env:BUTTERFLY_VERSION -Value "$($_.matches.groups[1])"}
178- & 'C:/Program Files (x86)/Inno Setup 6/ISCC.exe' /DMyAppVersion=$Env:BUTTERFLY_VERSION ButterflySetup.iss
179- # flutter pub run msix:create
191+ & 'C:/Program Files (x86)/Inno Setup 6/ISCC.exe' /DMyAppVersion=$Env:BUTTERFLY_VERSION /DMyAppArch=${{ matrix.arch.dir }} ButterflySetup.iss
180192 - name : Copy portable start script
181193 run : |
182- cp scripts/start.bat build/windows/x64 /runner/Release/
183- cp build/windows/x64 /linwood-butterfly-windows-setup.exe linwood-butterfly-windows-setup-x86_64 .exe
194+ cp scripts/start.bat build/windows/${{ matrix.arch.dir }} /runner/Release/
195+ cp build/windows/${{ matrix.arch.dir }} /linwood-butterfly-windows-setup.exe linwood-butterfly-windows-setup-${{ matrix.arch.name }} .exe
184196 - name : Archive
185197 uses : actions/upload-artifact@v7
186198 with :
187- name : windows-build
199+ name : windows-${{ matrix.arch.name }}- build
188200 path : |
189- app/build/windows/x64 /runner/Release/**
201+ app/build/windows/${{ matrix.arch.dir }} /runner/Release/**
190202 - name : Archive
191203 uses : actions/upload-artifact@v7
192204 with :
193- name : windows-setup
205+ name : windows-${{ matrix.arch.name }}- setup
194206 path : |
195- app/linwood-butterfly-windows-setup-x86_64 .exe
207+ app/linwood-butterfly-windows-setup-${{ matrix.arch.name }} .exe
196208 build-msix :
197209 name : build-msix
198210 runs-on : windows-2025
@@ -402,6 +414,7 @@ jobs:
402414 - uses : snapcore/action-build@v1
403415 id : build
404416 - uses : snapcore/action-publish@v1
417+ continue-on-error : true
405418 name : Publish Snap to Store
406419 if : ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || github.ref == 'refs/tags/nightly' || github.ref == 'refs/tags/stable' }}
407420 env :
@@ -603,8 +616,12 @@ jobs:
603616 name : apk-x86_64-build-legacy
604617 - uses : actions/download-artifact@v8
605618 with :
606- name : windows-build
607- path : windows-build/
619+ name : windows-arm64-build
620+ path : windows-arm64-build/
621+ - uses : actions/download-artifact@v8
622+ with :
623+ name : windows-x86_64-build
624+ path : windows-x86_64-build/
608625 - uses : actions/download-artifact@v8
609626 with :
610627 name : linux-x86_64-build
@@ -659,7 +676,10 @@ jobs:
659676 name : linux-alternative-arm64-appimage
660677 - uses : actions/download-artifact@v8
661678 with :
662- name : windows-setup
679+ name : windows-x86_64-setup
680+ - uses : actions/download-artifact@v8
681+ with :
682+ name : windows-arm64-setup
663683 - uses : actions/download-artifact@v8
664684 with :
665685 name : macos-build
@@ -671,8 +691,10 @@ jobs:
671691 name : ipa-build
672692 - name : 📦 Zip artifacts
673693 run : |
674- cd windows-build
694+ cd windows-x86_64- build
675695 zip -r ../linwood-butterfly-windows-x86_64.zip *
696+ cd ../windows-arm64-build
697+ zip -r ../linwood-butterfly-windows-arm64.zip *
676698 cd ..
677699 tar -C linux-x86_64-build -czf linwood-butterfly-linux-x86_64.tar.gz .
678700 tar -C linux-arm64-build -czf linwood-butterfly-linux-arm64.tar.gz .
@@ -712,6 +734,8 @@ jobs:
712734 files : |
713735 linwood-butterfly-windows-setup-x86_64.exe
714736 linwood-butterfly-windows-x86_64.zip
737+ linwood-butterfly-windows-setup-arm64.exe
738+ linwood-butterfly-windows-arm64.zip
715739 linwood-butterfly-linux-x86_64.tar.gz
716740 linwood-butterfly-linux-x86_64.deb
717741 linwood-butterfly-linux-x86_64.rpm
@@ -756,6 +780,8 @@ jobs:
756780 files : |
757781 linwood-butterfly-windows-setup-x86_64.exe
758782 linwood-butterfly-windows-x86_64.zip
783+ linwood-butterfly-windows-setup-arm64.exe
784+ linwood-butterfly-windows-arm64.zip
759785 linwood-butterfly-linux-x86_64.tar.gz
760786 linwood-butterfly-linux-x86_64.deb
761787 linwood-butterfly-linux-x86_64.rpm
@@ -798,6 +824,8 @@ jobs:
798824 files : |
799825 linwood-butterfly-windows-setup-x86_64.exe
800826 linwood-butterfly-windows-x86_64.zip
827+ linwood-butterfly-windows-setup-arm64.exe
828+ linwood-butterfly-windows-arm64.zip
801829 linwood-butterfly-linux-x86_64.tar.gz
802830 linwood-butterfly-linux-x86_64.deb
803831 linwood-butterfly-linux-x86_64.rpm
0 commit comments