diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml new file mode 100644 index 0000000..0595e45 --- /dev/null +++ b/.github/workflows/build-plugin.yml @@ -0,0 +1,71 @@ +name: Build VCV Rack Plugin +on: [push, pull_request] + +env: + rack-sdk-version: 2.1.0 + +defaults: + run: + shell: bash + +jobs: + build: + name: ${{ matrix.config.os }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - os: ubuntu-latest + arch: lin + compiler: cc + install-dependencies: | + sudo apt-get update && sudo apt-get install -y libglu-dev + - os: macos-latest + arch: mac + compiler: cc + install-dependencies: | + brew install mesa + - os: windows-latest + arch: win + compiler: gcc + install-dependencies: | + choco install --no-progress -y zip + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install Rack SDK + run: | + curl -o sdk.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-${{ matrix.config.arch }}.zip + unzip sdk.zip + - name: Install Dependencies + run: | + ${{ matrix.config.install-dependencies }} + - name: Build + env: + RACK_DIR: Rack-SDK + CC: ${{ matrix.config.compiler }} + run: | + make dist + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + path: dist + name: ${{ matrix.config.arch }}.zip + + publish: + name: Publish plugin + runs-on: ubuntu-18.04 + needs: build + steps: + - uses: actions/download-artifact@v2 + with: + path: _artifacts + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + _artifacts/**/*.vcvplugin