-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (98 loc) · 3.01 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Release
on:
push:
# tags:
# - 'v*.*.*'
# Common variables for all platforms (ldc is hardcoded in windows job)
env:
# List of commands
DPlugBuild: ${{ github.workspace }}/Dplug/tools/dplug-build/dplug-build
defaults:
run:
shell: pwsh
jobs:
Release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
# - windows-latest
- ubuntu-20.04 # for glibc compatibility with systems > 20.04
# - macOS-latest
arch:
- 'x86_64'
compiler:
- ldc-latest
steps:
# Checkout
- name: Checkout master branch
uses: actions/checkout@v4
# Install
- name: Install Dependencies - Ubuntu
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get -yq install libx11-dev
# - name: Install Dependencies - Mac
# if: startsWith(matrix.os,'macOS')
# run: |
# brew update
- name: Setup Visual Studio Command Prompt - Windows
if: startsWith(matrix.os,'windows')
uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: ${{ matrix.arch }} # 'x64'by default
- name: Install compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.compiler }}
- name: Get Dplug
uses: GuillaumeFalourd/[email protected]
with:
depth: 1
branch: 'master'
owner: 'AuburnSounds'
repository: 'Dplug'
- name: Install dplug-build
run: |
dub build
working-directory: ./Dplug/tools/dplug-build
## Build plugin
- name: Build Inflator plugins
run: |
if ("${{ matrix.os }}" -like 'windows*') {
$Plugins = "-c VST3"
$BuildPrefix = "Windows-64b"
} elseif ("${{ matrix.os }}" -like 'macOS*') {
$Plugins = "-c VST3"
$BuildPrefix = "macos-64b"
} elseif ("${{ matrix.os }}" -like 'ubuntu*') {
$Plugins = "-c VST3 -c LV2"
$BuildPrefix = "Linux-64b"
}
$esc = '--%'
${{ env.DPlugBuild }} -a ${{ matrix.arch }} $esc $Plugins
working-directory: ./plugin
# Create release archives
- name: Create release archive for Linux
run: |
zip plugin/builds/linux-64b.zip "plugin/builds/Linux-64b-LV2/Gahel inflator.lv2/" "plugin/builds/Linux-64b-VST3/Gahel inflator.vst3/"
ls -R plugin/builds/
# TODO: other platforms
# Create release for each platform
# Apparently pattern matching doesn't work here
- name: Create release for Linux
if: startsWith(matrix.os,'ubuntu')
uses: softprops/action-gh-release@v2
with:
files: plugin/builds/linux-64b.zip
- name: Create release for Windows
if: startsWith(matrix.os,'windows')
uses: softprops/action-gh-release@v2
with:
files: plugin/builds/Windows-64b.zip
- name: Create release for macos
if: startsWith(matrix.os,'macos')
uses: softprops/action-gh-release@v2
with:
files: plugin/builds/macos-64b.zip