-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Added GitHub Action to build and deploy releases
- Loading branch information
Showing
2 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
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 }} |
This file contains 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