Skip to content

Commit

Permalink
CI: Added GitHub Action to build and deploy releases
Browse files Browse the repository at this point in the history
  • Loading branch information
drowaudio committed Sep 2, 2020
1 parent bfe67b9 commit cf10121
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 1 deletion.
110 changes: 110 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build
on: [push]

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-16.04
platform: linux
- name: macOS
os: macos-latest
platform: mac
- name: Windows
os: windows-2016
platform: windows
# cfg:
# - { name: Linux, os: ubuntu-16.04, platform: linux }
# - { name: macOS, os: macos-latest, platform: mac }
# - { name: Windows, os: windows-latest, platform: windows }
runs-on: ${{ matrix.os }}
steps:
# Install dependencies
- name: Install dependencies
if: ${{ matrix.platform == 'linux' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-6 g++-6 freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev ladspa-sdk webkit2gtk-4.0 libgtk-3-dev xvfb
- uses: actions/checkout@v2
with:
submodules: true

# Import certificates
- uses: apple-actions/import-codesign-certs@v1
if: ${{ matrix.platform == 'mac' }}
with:
p12-file-base64: ${{ secrets.DEV_CERT_APP }}
p12-password: ${{ secrets.CERT_PASSWORD }}
env:
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
DEV_CERT_APP: ${{ secrets.DEV_CERT_APP }}

# Build products
- name: "Build products"
run: |
export MSBUILD_EXE="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
export SIGN_ID=${DEV_ID_APP}
./install/build
if [[ "$OSTYPE" == "darwin"* ]]; then
./install/notarise ${{ github.workspace }}/bin/mac/pluginval_macOS.zip com.tracktion.pluginval ${AC_USERNAME} ${AC_PASSWORD}
fi
shell: bash
env:
VST2_SDK_URL: ${{ secrets.VST2_SDK_URL }}
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
DEV_CERT_APP: ${{ secrets.DEV_CERT_APP }}
DEV_ID_APP: ${{ secrets.DEV_ID_APP }}
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}

# Upload artefacts
- uses: actions/upload-artifact@v2
with:
name: pluginval_${{ matrix.name }}.zip
path: ./bin/${{ matrix.platform }}/pluginval_${{ matrix.name }}.zip
- uses: actions/upload-artifact@v2
if: ${{ matrix.platform == 'linux' }}
with:
name: CHANGELIST.md
path: ./CHANGELIST.md

# Create release for tagged refs
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Get Artifacts
uses: actions/download-artifact@v2
with:
path: ./

- name: Display structure of downloaded files
run: ls -la

- name: Set tag name variable
run: |
REF=${GITHUB_REF}
echo ::set-env name=TAG_NAME::${REF##*/}
shell: bash

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
name: ${{ env.TAG_NAME }}
body_path: CHANGELIST.md/CHANGELIST.md
draft: true
files: |
CHANGELIST.md/*
pluginval_Linux.zip/*
pluginval_macOS.zip/*
pluginval_Windows.zip/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion install/build
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ elif [[ "$PLATFORM" == "windows" ]]; then
CMAKE_PLATFORM_ARGS="-A x64"

if [ -z "$MSBUILD_EXE" ]; then
echo MSBuild not found at "${MSBUILD_EXE}", using default
MSBUILD_EXE="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
fi

if [ ! -f "$MSBUILD_EXE" ]; then
echo MSBuild.exe not found!
echo MSBuild.exe not found at "${MSBUILD_EXE}"
exit 1
fi
fi
Expand Down

0 comments on commit cf10121

Please sign in to comment.