fix(companion-win): register watermorph:// protocol + handle open-url #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Morph Plugin | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths: | |
| - 'Source/**' | |
| - 'Libs/**' | |
| - 'CMakeLists.txt' | |
| - '.github/workflows/build-plugin.yml' | |
| - 'CompanionWin/**' | |
| - 'Companion/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| # ── Mac (AU + VST3, Universal) ───────────────────────────────────────────── | |
| build-mac: | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Clone JUCE | |
| run: git clone --depth=1 --branch=8.0.12 https://github.com/juce-framework/JUCE.git ../JUCE | |
| - name: Configure (CMake) | |
| run: | | |
| cmake -B build-mac \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DJUCE_PATH="$(pwd)/../JUCE" \ | |
| -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 | |
| - name: Build | |
| run: cmake --build build-mac --config Release --parallel | |
| - name: Collect plugin files | |
| run: | | |
| mkdir -p dist/mac | |
| find build-mac -name "*.vst3" -exec cp -R {} dist/mac/ \; | |
| find build-mac -name "*.component" -exec cp -R {} dist/mac/ \; | |
| - name: Build .pkg installer | |
| run: | | |
| mkdir -p pkg-root/Library/Audio/Plug-Ins/VST3 | |
| mkdir -p pkg-root/Library/Audio/Plug-Ins/Components | |
| cp -R dist/mac/Morph.vst3 pkg-root/Library/Audio/Plug-Ins/VST3/ | |
| cp -R dist/mac/Morph.component pkg-root/Library/Audio/Plug-Ins/Components/ | |
| pkgbuild \ | |
| --root pkg-root \ | |
| --identifier ai.95ent.morph \ | |
| --version 1.0.0 \ | |
| --install-location / \ | |
| Water_Morph_1.0.0_macOS.pkg | |
| - name: Upload Mac installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Water_Morph_1.0.0_macOS | |
| path: Water_Morph_1.0.0_macOS.pkg | |
| retention-days: 14 | |
| - name: Publish Mac to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: "Water Morph — Latest Build" | |
| prerelease: true | |
| make_latest: true | |
| files: Water_Morph_1.0.0_macOS.pkg | |
| # ── Windows (VST3, x64) ──────────────────────────────────────────────────── | |
| build-windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Clone JUCE | |
| run: git clone --depth=1 --branch=8.0.12 https://github.com/juce-framework/JUCE.git ../JUCE | |
| - name: Configure (CMake) | |
| run: | | |
| cmake -B build-win ` | |
| -G "Visual Studio 17 2022" -A x64 ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| "-DJUCE_PATH=${{ github.workspace }}\..\JUCE" | |
| - name: Build | |
| # continue-on-error: juce_vst3_helper.exe post-build step can fail on CI | |
| # (moduleinfo.json generation) even though the VST3 DLL compiled correctly. | |
| continue-on-error: true | |
| run: cmake --build build-win --config Release --parallel | |
| - name: Collect VST3 | |
| run: | | |
| $vst3 = Get-ChildItem -Path build-win -Filter "Morph.vst3" -Recurse -Directory | Select-Object -First 1 | |
| if (-not $vst3) { Write-Error "VST3 not found — compile failed"; exit 1 } | |
| New-Item -ItemType Directory -Force -Path dist\win | Out-Null | |
| Copy-Item -Path $vst3.FullName -Destination dist\win -Recurse | |
| - name: Upload Windows VST3 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Morph-Windows-VST3 | |
| path: dist\win\ | |
| retention-days: 1 | |
| # ── Windows installer (VST3 + Electron companion, bundled) ──────────────── | |
| build-installer-win: | |
| runs-on: windows-2022 | |
| needs: build-windows | |
| defaults: | |
| run: | |
| working-directory: CompanionWin | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Download VST3 artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Morph-Windows-VST3 | |
| path: CompanionWin/vst3 | |
| - name: Install deps | |
| run: npm install | |
| - name: Build installer | |
| run: npx electron-builder --win --x64 --publish=never | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: false | |
| - name: Upload Windows installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Water_Morph_1.0.0_Windows | |
| path: CompanionWin/dist/*.exe | |
| retention-days: 14 | |
| - name: Publish Windows to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: "Water Morph — Latest Build" | |
| prerelease: true | |
| make_latest: true | |
| files: CompanionWin/dist/*.exe |