From 8cfc7f41252434ecc7e2701e6d87802546083a5b Mon Sep 17 00:00:00 2001 From: Andrey Danilov Date: Thu, 27 Jul 2023 23:00:48 +0300 Subject: [PATCH] Add workflow for building VST --- .github/workflows/release-vst.yml | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/release-vst.yml diff --git a/.github/workflows/release-vst.yml b/.github/workflows/release-vst.yml new file mode 100644 index 0000000..ee4b3b8 --- /dev/null +++ b/.github/workflows/release-vst.yml @@ -0,0 +1,81 @@ +name: Release Juicy Noise VST + +on: + push: + tags: + - '*' + +jobs: + build: + strategy: + matrix: + os: [ + ubuntu-latest, + ] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Build for Linux + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt update + sudo apt install \ + libasound2-dev \ + libjack-jackd2-dev \ + ladspa-sdk \ + libcurl4-openssl-dev \ + libfreetype6-dev \ + libx11-dev \ + libxcomposite-dev \ + libxcursor-dev \ + libxcursor-dev \ + libxext-dev \ + libxinerama-dev \ + libxrandr-dev \ + libxrender-dev \ + libwebkit2gtk-4.0-dev \ + libglu1-mesa-dev \ + mesa-common-dev + project_path="${PWD}/juicy-noise-fx/juicy-noise-fx.jucer" + pushd "JUCE/extras/Projucer/Builds/LinuxMakefile" + make + pushd "build" + chmod +x ./Projucer + ./Projucer --resave "${project_path}" + popd + popd + make_dir="juicy-noise-fx/Builds/LinuxMakefile" + mkdir -p "${make_dir}" + pushd "${make_dir}" + make VST3 + + - name: Pack artifacts + run: | + vst_name="juicy-noise-fx.vst3" + find . -type d -name "${vst_name}" \ + | while read -r vst_dir; do + for platform_dir in "${vst_dir}/Contents/"*; do + platform="$(basename "${platform_dir}")" + archive_name="juicy-noise-fx-${platform}" + mkdir "${archive_name}" + cp -r "${vst_dir}" "${archive_name}/${vst_name}" + pushd "${archive_name}" + zip -r "${archive_name}.zip" "${vst_name}/" + popd + cp "${archive_name}/${archive_name}.zip" "${archive_name}.zip" + rm -rf "${archive_name}" + done + done + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + token: ${{ secrets._GITHUB_PAT }} + files: juicy-noise-fx-*.zip