Skip to content

Release

Release #6

Workflow file for this run

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: Install IPP (Windows)
run: |
nuget install intelipp.static.win-x64 -Version 2022.3.0.387
- name: Generate Build Files
run: |
cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -DCPP_SIMD_DETECTOR_BUILD_EXAMPLES=OFF -DBUILD_IN_CI=1 -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 "Ninja" -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCPP_SIMD_DETECTOR_BUILD_EXAMPLES=OFF -DBUILD_IN_CI=1 -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/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
# from pamplejuce
- name: Install JUCE's Linux Deps
# Thanks to McMartin & co https://forum.juce.com/t/list-of-juce-dependencies-under-linux/15121/44
run: |
# IPP stuff
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update && sudo apt install libasound2-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.1-dev libglu1-mesa-dev xvfb ninja-build intel-oneapi-ipp-devel
sudo /usr/bin/Xvfb $DISPLAY &
- name: Generate Build Files
run: |
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=OFF -DCPP_SIMD_DETECTOR_BUILD_EXAMPLES=OFF -DBUILD_IN_CI=1 -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: Append tag to artifacts
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
MAC_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-macos -type d -name "Release" | head -n 1)
WIN_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-win -type d -name "Release" | head -n 1)
LINUX_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-linux -type d -name "Release" | head -n 1)
DEST_DIR="$GITHUB_WORKSPACE/artifacts"
# macOS
if [ -d "$MAC_RELEASE_DIR" ]; then
echo "Packing macOS from $MAC_RELEASE_DIR"
cd "$MAC_RELEASE_DIR"
zip -r "$DEST_DIR/plugin-macos-${TAG_NAME}.zip" .
fi
# Windows
if [ -d "$WIN_RELEASE_DIR" ]; then
echo "Packing Windows from $WIN_RELEASE_DIR"
cd "$WIN_RELEASE_DIR"
zip -r "$DEST_DIR/plugin-win-${TAG_NAME}.zip" .
fi
# Linux
if [ -d "$LINUX_RELEASE_DIR" ]; then
echo "Packing Linux from $LINUX_RELEASE_DIR"
cd "$LINUX_RELEASE_DIR"
zip -r "$DEST_DIR/plugin-linux-${TAG_NAME}.zip" .
fi
cd $GITHUB_WORKSPACE
- 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 }}