Add GitHub Actions CI: auto-build for Windows + macOS

- Windows: VST3 + Standalone (x64, MSVC 2022)
- macOS: VST3 + AU + Standalone (Universal Binary: arm64 + x86_64)
- Auto-release: push a tag (e.g. v1.2) to create GitHub Release with all artifacts
- Added AU format to CMakeLists.txt (macOS Audio Unit)
- Builds on every push to main and on PRs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hariel1985
2026-03-23 07:15:31 +01:00
szülő 2a59d7a0d7
commit df56eafff5
2 fájl változott, egészen pontosan 109 új sor hozzáadva és 1 régi sor törölve

108
.github/workflows/build.yml vendored Normal file
Fájl megtekintése

@@ -0,0 +1,108 @@
name: Build InstaDrums
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Clone JUCE
run: git clone --depth 1 https://github.com/juce-framework/JUCE.git ../JUCE
- name: Configure CMake
run: cmake -B build -G "Visual Studio 17 2022" -A x64
- name: Build Release
run: cmake --build build --config Release
- name: Package VST3
run: Compress-Archive -Path "build/InstaDrums_artefacts/Release/VST3/InstaDrums.vst3" -DestinationPath "InstaDrums-VST3-Win64.zip"
- name: Package Standalone
run: Compress-Archive -Path "build/InstaDrums_artefacts/Release/Standalone/InstaDrums.exe" -DestinationPath "InstaDrums-Standalone-Win64.zip"
- name: Upload VST3
uses: actions/upload-artifact@v4
with:
name: InstaDrums-VST3-Win64
path: InstaDrums-VST3-Win64.zip
- name: Upload Standalone
uses: actions/upload-artifact@v4
with:
name: InstaDrums-Standalone-Win64
path: InstaDrums-Standalone-Win64.zip
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Clone JUCE
run: git clone --depth 1 https://github.com/juce-framework/JUCE.git ../JUCE
- name: Configure CMake (Universal Binary)
run: cmake -B build -G Xcode -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
- name: Build Release
run: cmake --build build --config Release
- name: Package VST3
working-directory: build/InstaDrums_artefacts/Release
run: zip -r $GITHUB_WORKSPACE/InstaDrums-VST3-macOS.zip VST3/InstaDrums.vst3
- name: Package AU
working-directory: build/InstaDrums_artefacts/Release
run: zip -r $GITHUB_WORKSPACE/InstaDrums-AU-macOS.zip AU/InstaDrums.component
- name: Package Standalone
working-directory: build/InstaDrums_artefacts/Release
run: zip -r $GITHUB_WORKSPACE/InstaDrums-Standalone-macOS.zip Standalone/InstaDrums.app
- name: Upload VST3
uses: actions/upload-artifact@v4
with:
name: InstaDrums-VST3-macOS
path: InstaDrums-VST3-macOS.zip
- name: Upload AU
uses: actions/upload-artifact@v4
with:
name: InstaDrums-AU-macOS
path: InstaDrums-AU-macOS.zip
- name: Upload Standalone
uses: actions/upload-artifact@v4
with:
name: InstaDrums-Standalone-macOS
path: InstaDrums-Standalone-macOS.zip
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/InstaDrums-VST3-Win64/InstaDrums-VST3-Win64.zip
artifacts/InstaDrums-Standalone-Win64/InstaDrums-Standalone-Win64.zip
artifacts/InstaDrums-VST3-macOS/InstaDrums-VST3-macOS.zip
artifacts/InstaDrums-AU-macOS/InstaDrums-AU-macOS.zip
artifacts/InstaDrums-Standalone-macOS/InstaDrums-Standalone-macOS.zip
generate_release_notes: true

Fájl megtekintése

@@ -13,7 +13,7 @@ juce_add_plugin(InstaDrums
NEEDS_MIDI_OUTPUT TRUE NEEDS_MIDI_OUTPUT TRUE
PLUGIN_MANUFACTURER_CODE Inst PLUGIN_MANUFACTURER_CODE Inst
PLUGIN_CODE Idrm PLUGIN_CODE Idrm
FORMATS VST3 Standalone FORMATS VST3 AU Standalone
PRODUCT_NAME "InstaDrums" PRODUCT_NAME "InstaDrums"
COPY_PLUGIN_AFTER_BUILD FALSE COPY_PLUGIN_AFTER_BUILD FALSE
) )