|
| 1 | +name: Build |
| 2 | +on: [push] |
| 3 | + |
| 4 | +jobs: |
| 5 | + build: |
| 6 | + strategy: |
| 7 | + fail-fast: false |
| 8 | + matrix: |
| 9 | + include: |
| 10 | + - name: Linux |
| 11 | + os: ubuntu-16.04 |
| 12 | + platform: linux |
| 13 | + - name: macOS |
| 14 | + os: macos-latest |
| 15 | + platform: mac |
| 16 | + - name: Windows |
| 17 | + os: windows-2016 |
| 18 | + platform: windows |
| 19 | + # cfg: |
| 20 | + # - { name: Linux, os: ubuntu-16.04, platform: linux } |
| 21 | + # - { name: macOS, os: macos-latest, platform: mac } |
| 22 | + # - { name: Windows, os: windows-latest, platform: windows } |
| 23 | + runs-on: ${{ matrix.os }} |
| 24 | + steps: |
| 25 | + # Install dependencies |
| 26 | + - name: Install dependencies |
| 27 | + if: ${{ matrix.platform == 'linux' }} |
| 28 | + run: | |
| 29 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 30 | + sudo apt-get update |
| 31 | + 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 |
| 32 | +
|
| 33 | + - uses: actions/checkout@v2 |
| 34 | + with: |
| 35 | + submodules: true |
| 36 | + |
| 37 | + # Import certificates |
| 38 | + - uses: apple-actions/import-codesign-certs@v1 |
| 39 | + if: ${{ matrix.platform == 'mac' }} |
| 40 | + with: |
| 41 | + p12-file-base64: ${{ secrets.DEV_CERT_APP }} |
| 42 | + p12-password: ${{ secrets.CERT_PASSWORD }} |
| 43 | + env: |
| 44 | + CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }} |
| 45 | + DEV_CERT_APP: ${{ secrets.DEV_CERT_APP }} |
| 46 | + |
| 47 | + # Build products |
| 48 | + - name: "Build products" |
| 49 | + run: | |
| 50 | + export MSBUILD_EXE="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" |
| 51 | + export SIGN_ID=${DEV_ID_APP} |
| 52 | + ./install/build |
| 53 | + |
| 54 | + if [[ "$OSTYPE" == "darwin"* ]]; then |
| 55 | + ./install/notarise ${{ github.workspace }}/bin/mac/pluginval_macOS.zip com.tracktion.pluginval ${AC_USERNAME} ${AC_PASSWORD} |
| 56 | + fi |
| 57 | + shell: bash |
| 58 | + env: |
| 59 | + VST2_SDK_URL: ${{ secrets.VST2_SDK_URL }} |
| 60 | + CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }} |
| 61 | + DEV_CERT_APP: ${{ secrets.DEV_CERT_APP }} |
| 62 | + DEV_ID_APP: ${{ secrets.DEV_ID_APP }} |
| 63 | + AC_USERNAME: ${{ secrets.AC_USERNAME }} |
| 64 | + AC_PASSWORD: ${{ secrets.AC_PASSWORD }} |
| 65 | + |
| 66 | + # Upload artefacts |
| 67 | + - uses: actions/upload-artifact@v2 |
| 68 | + with: |
| 69 | + name: pluginval_${{ matrix.name }}.zip |
| 70 | + path: ./bin/${{ matrix.platform }}/pluginval_${{ matrix.name }}.zip |
| 71 | + - uses: actions/upload-artifact@v2 |
| 72 | + if: ${{ matrix.platform == 'linux' }} |
| 73 | + with: |
| 74 | + name: CHANGELIST.md |
| 75 | + path: ./CHANGELIST.md |
| 76 | + |
| 77 | + # Create release for tagged refs |
| 78 | + deploy: |
| 79 | + if: startsWith(github.ref, 'refs/tags/') |
| 80 | + needs: build |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - name: Get Artifacts |
| 84 | + uses: actions/download-artifact@v2 |
| 85 | + with: |
| 86 | + path: ./ |
| 87 | + |
| 88 | + - name: Display structure of downloaded files |
| 89 | + run: ls -la |
| 90 | + |
| 91 | + - name: Set tag name variable |
| 92 | + run: | |
| 93 | + REF=${GITHUB_REF} |
| 94 | + echo ::set-env name=TAG_NAME::${REF##*/} |
| 95 | + shell: bash |
| 96 | + |
| 97 | + - name: Create Release |
| 98 | + uses: softprops/action-gh-release@v1 |
| 99 | + with: |
| 100 | + tag_name: ${{ env.TAG_NAME }} |
| 101 | + name: ${{ env.TAG_NAME }} |
| 102 | + body_path: CHANGELIST.md/CHANGELIST.md |
| 103 | + draft: true |
| 104 | + files: | |
| 105 | + CHANGELIST.md/* |
| 106 | + pluginval_Linux.zip/* |
| 107 | + pluginval_macOS.zip/* |
| 108 | + pluginval_Windows.zip/* |
| 109 | + env: |
| 110 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments