|
| 1 | +# This workflow will build a golang project |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go |
| 3 | + |
| 4 | +name: Build Windows |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "main" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "main" ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + runs-on: windows-11-arm |
| 15 | + defaults: |
| 16 | + run: |
| 17 | + shell: msys2 {0} |
| 18 | + steps: |
| 19 | + - uses: msys2/setup-msys2@v2 |
| 20 | + with: |
| 21 | + path-type: inherit |
| 22 | + update: true |
| 23 | + install: >- |
| 24 | + make |
| 25 | + wget |
| 26 | + zip |
| 27 | + p7zip |
| 28 | + - uses: actions/checkout@v3 |
| 29 | + |
| 30 | + - name: Set up Go |
| 31 | + uses: actions/setup-go@v4 |
| 32 | + with: |
| 33 | + go-version: '1.21' |
| 34 | + |
| 35 | + - name: Install Dependencies |
| 36 | + run: > |
| 37 | + pacman -Syu && |
| 38 | + pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-mpv |
| 39 | +
|
| 40 | + - name: Install Fyne tool |
| 41 | + run: go install fyne.io/fyne/v2/cmd/fyne@latest |
| 42 | + |
| 43 | + - name: Package |
| 44 | + run: make package_windows |
| 45 | + |
| 46 | + - name: Download mpv dll |
| 47 | + run: > |
| 48 | + wget https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20250810/mpv-dev-aarch64-20250810-git-01b7edc.7z && |
| 49 | + 7z x mpv-dev-aarch64-20250810-git-01b7edc.7z |
| 50 | +
|
| 51 | + - name: Download smtc dll |
| 52 | + run: > |
| 53 | + wget https://github.com/supersonic-app/smtc-dll/releases/download/v0.1.2/SMTC_arm64.dll && |
| 54 | + mv SMTC_arm64.dll SMTC.dll |
| 55 | +
|
| 56 | + - name: Generate zip bundle |
| 57 | + run: zip Supersonic-windows.zip Supersonic.exe libmpv-2.dll SMTC.dll |
| 58 | + |
| 59 | + - name: Generate installer |
| 60 | + uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 |
| 61 | + with: |
| 62 | + path: win_inno_installscript.iss |
| 63 | + |
| 64 | + - name: Upload zip |
| 65 | + uses: actions/upload-artifact@v4 |
| 66 | + with: |
| 67 | + name: Supersonic_windows_x64.zip |
| 68 | + path: Supersonic-windows.zip |
| 69 | + |
| 70 | + - name: Upload installer |
| 71 | + uses: actions/upload-artifact@v4 |
| 72 | + with: |
| 73 | + name: Supersonic_windows_x64_installer.exe |
| 74 | + path: Output/supersonic-installer.exe |
0 commit comments