Release #1
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: Release | |
| permissions: | |
| contents: write | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Clang | |
| uses: egor-tensin/setup-clang@v2 | |
| with: | |
| version: latest | |
| platform: x86 | |
| cc: 1 | |
| - name: Generate Build Files | |
| run: | | |
| cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -S . -B ./build | |
| - name: Build Project | |
| run: | | |
| cmake --build ./build --config Release | |
| - name: List errors | |
| run: | | |
| if exist .\build\CMakeFiles\CMakeError.log type .\build\CMakeFiles\CMakeError.log | |
| shell: cmd | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-win | |
| path: | | |
| ./build/*_artefacts/Release/VST3 | |
| !./build/*_artefacts/Release/VST3/*.exp | |
| !./build/*_artefacts/Release/VST3/*.lib | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| run: brew install cmake ninja | |
| - name: Generate Build Files | |
| run: | | |
| cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -S . -B ./build | |
| - name: Build Project | |
| run: | | |
| cmake --build ./build --config Release | |
| - name: List errors | |
| run: cat "./build/CMakeFiles/CMakeError.log" || true | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-macos | |
| path: | | |
| ./build/*_artefacts/Release/AU | |
| ./build/*_artefacts/Release/VST3 | |
| ./build/*_artefacts/Release/readme.txt | |
| !./build/*_artefacts/Release/VST3/*.exp | |
| !./build/*_artefacts/Release/VST3/*.lib | |
| build-linux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get install libx11-dev libfreetype-dev libfontconfig1-dev libasound2-dev libxrandr-dev libxinerama-dev libxcursor-dev | |
| - name: Generate Build Files | |
| run: | | |
| cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -S . -B ./build | |
| - name: Build Project | |
| run: | | |
| cmake --build ./build --config Release | |
| - name: List errors | |
| run: cat "./build/CMakeFiles/CMakeError.log" || true | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-linux | |
| path: | | |
| ./build/*_artefacts/Release/LV2 | |
| ./build/*_artefacts/Release/VST3 | |
| !./build/*_artefacts/Release/VST3/*.exp | |
| !./build/*_artefacts/Release/VST3/*.lib | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build-windows, build-macos, build-linux] | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: plugin-win | |
| path: artifacts/plugin-win | |
| - name: Download macOS artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: plugin-macos | |
| path: artifacts/plugin-macos | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: plugin-linux | |
| path: artifacts/plugin-linux | |
| - name: Append tag to artifacts | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} # Extracts the tag name, e.g., v1.0.0 | |
| # Zip each platform's artifacts with the tag in the name | |
| cd artifacts | |
| zip -r plugin-win-${TAG_NAME}.zip plugin-win | |
| zip -r plugin-macos-${TAG_NAME}.zip plugin-macos | |
| zip -r plugin-linux-${TAG_NAME}.zip plugin-linux | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| tag_name: ${{ github.ref_name }} | |
| files: | | |
| artifacts/plugin-win-*.zip | |
| artifacts/plugin-macos-*.zip | |
| artifacts/plugin-linux-*.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |