11name : Build VCV Rack Plugin
22on : [push, pull_request]
33
4- env :
5- rack-sdk-version : 2.0.3
6-
74defaults :
85 run :
96 shell : bash
107
118jobs :
129 build :
13- name : ${{ matrix.config.name }}
14- runs-on : ${{ matrix.config.os }}
10+ name : ${{ matrix.platform }}
11+ runs-on : ubuntu-latest
12+ container :
13+ image : ghcr.io/qno/rack-plugin-toolchain:v2
14+ options : --user root
1515 strategy :
1616 matrix :
17- config :
18- - {
19- name : Linux,
20- sdk-platform : lin,
21- os : ubuntu-latest,
22- prepare-os : sudo apt update && sudo apt install -y libglu-dev
23- }
24- - {
25- name : MacOS,
26- sdk-platform : mac,
27- os : macos-latest,
28- prepare-os : " "
29- }
30- - {
31- name : Windows,
32- sdk-platform : win,
33- os : windows-latest,
34- prepare-os : export CC=gcc
35- }
17+ platform : [linux, mac, win]
3618 steps :
37- - uses : actions/checkout@v2
19+ - uses : actions/checkout@v3
3820 with :
3921 submodules : recursive
40- - name : Get Rack-SDK
41- run : |
42- pushd $HOME
43- curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-${{ matrix.config.sdk-platform }}.zip
44- unzip Rack-SDK.zip
4522 - name : Modify plugin version
4623 # only modify plugin version if no tag was created
4724 if : " ! startsWith(github.ref, 'refs/tags/v')"
@@ -52,15 +29,14 @@ jobs:
5229 cat <<< `jq --arg VERSION "$pluginversion-$gitrev" '.version=$VERSION' plugin.json` > plugin.json
5330 - name : Build plugin
5431 run : |
55- ${{ matrix.config.prepare-os }}
56- export RACK_DIR=$HOME/Rack-SDK
57- make -j dep
58- make -j dist
32+ export PLUGIN_DIR=$GITHUB_WORKSPACE
33+ pushd /home/build/rack-plugin-toolchain
34+ make plugin-build-${{ matrix.platform }}
5935 - name : Upload artifact
6036 uses : actions/upload-artifact@v2
6137 with :
62- path : dist
63- name : ${{ matrix.config.name }}
38+ path : /home/build/rack-plugin-toolchain/plugin-build
39+ name : ${{ matrix.platform }}
6440
6541 publish :
6642 name : Publish plugin
@@ -70,13 +46,13 @@ jobs:
7046 runs-on : ubuntu-latest
7147 needs : build
7248 steps :
73- - uses : actions/checkout@v2
49+ - uses : actions/checkout@v3
7450 - uses : FranzDiebold/github-env-vars-action@v1.2.1
7551 - name : Check if plugin version matches tag
7652 run : |
7753 pluginversion=`jq -r '.version' plugin.json`
78- if [ "v$pluginversion" != "${{ env. GITHUB_REF_NAME }} " ]; then
79- echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '${{ env. GITHUB_REF_NAME }} '"
54+ if [ "v$pluginversion" != "$GITHUB_REF_NAME" ]; then
55+ echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '$GITHUB_REF_NAME'"
8056 exit 1
8157 fi
8258 - name : Create Release
8763 tag_name : ${{ github.ref }}
8864 release_name : Release ${{ github.ref }}
8965 body : |
90- ${{ env. GITHUB_REPOSITORY_NAME }} VCV Rack Plugin ${{ env. GITHUB_REF_NAME }}
66+ $GITHUB_REPOSITORY_NAME VCV Rack Plugin $GITHUB_REF_NAME
9167 draft : false
9268 prerelease : false
9369 - uses : actions/download-artifact@v2
0 commit comments