Skip to content

🚀 0.0.7

🚀 0.0.7 #107

Workflow file for this run

name: build obs plugin
on:
push:
branches: [ main, ci, dev, zip-support ]
tags: [ '*' ]
#pull_request:
# branches: [ main ]
env:
PLUGIN_NAME: shadertastic
OBS_VERSION: 28.1.2
LIBZIP_VERSION: v1.10.1
jobs:
# macos:
# name: macOS
# runs-on: macos-12
# strategy:
# fail-fast: false
# matrix:
# arch: [x86_64, arm64, universal]
# outputs:
# commitHash: ${{ steps.setup.outputs.commitHash }}
# env:
# CODESIGN_IDENT: '-'
# CODESIGN_IDENT_INSTALLER: ''
# MACOSX_DEPLOYMENT_TARGET: '10.15'
# defaults:
# run:
# shell: zsh {0}
# steps:
# - name: Checkout
# uses: actions/[email protected]
# with:
# path: plugin
# submodules: recursive
#
# - name: Checkout obs-studio
# uses: actions/checkout@v3
# with:
# repository: 'obsproject/obs-studio'
# path: obs-studio
# fetch-depth: 0
# submodules: recursive
#
# - name: Setup Environment
# id: setup
# working-directory: ${{ github.workspace }}/plugin
# run: |
# ## SETUP ENVIRONMENT SCRIPT
# print '::group::Clean Homebrew Environment'
# typeset -a to_remove=()
#
# for formula (speexdsp curl php) {
# if [[ -d ${HOMEBREW_PREFIX}/opt/${formula} ]] to_remove+=(${formula})
# }
#
# if (( #to_remove > 0 )) brew uninstall --ignore-dependencies ${to_remove}
# print '::endgroup::'
#
# print '::group::Set up code signing'
# if [[ '${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}' != '' && \
# '${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}' != '' && \
# '${{ secrets.MACOS_SIGNING_CERT }}' != '' ]] {
# print 'haveCodesignIdent=true' >> $GITHUB_OUTPUT
# } else {
# print 'haveCodesignIdent=false' >> $GITHUB_OUTPUT
# }
#
# if [[ '${{ secrets.MACOS_NOTARIZATION_USERNAME }}' != '' && \
# '${{ secrets.MACOS_NOTARIZATION_PASSWORD }}' != '' ]] {
# print 'haveNotarizationUser=true' >> $GITHUB_OUTPUT
# } else {
# print 'haveNotarizationUser=false' >> $GITHUB_OUTPUT
# }
# print '::endgroup::'
#
# print "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT
# print "commitHash=${"$(git rev-parse HEAD)"[0,9]}" >> $GITHUB_OUTPUT
#
# - name: Restore Compilation Cache
# id: ccache-cache
# uses: actions/[email protected]
# with:
# path: ${{ github.workspace }}/.ccache
# key: macos-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }}
# restore-keys: |
# macos-${{ matrix.arch }}-ccache-plugin-
#
# - name: Check for GitHub Labels
# id: seekingTesters
# if: ${{ github.event_name == 'pull_request' }}
# run: |
# if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]] {
# print 'found=true' >> $GITHUB_OUTPUT
# } else {
# print 'found=false' >> $GITHUB_OUTPUT
# }
#
# - name: Install Apple Developer Certificate
# if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
# uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
# with:
# keychain-password: ${{ github.run_id }}
# p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
# p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
#
# - name: Set Signing Identity
# if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
# run: |
# print "CODESIGN_IDENT=${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}" >> $GITHUB_ENV
# print "CODESIGN_IDENT_INSTALLER=${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}" >> $GITHUB_ENV
#
# - name: Build Plugin
# uses: ./plugin/.github/actions/build-plugin
# with:
# workingDirectory: ${{ github.workspace }}/plugin
# target: ${{ matrix.arch }}
# config: RelWithDebInfo
# codesign: 'true'
# codesignIdent: ${{ env.CODESIGN_IDENT }}
#
# - name: Package Plugin
# uses: ./plugin/.github/actions/package-plugin
# with:
# workingDirectory: ${{ github.workspace }}/plugin
# target: ${{ matrix.arch }}
# config: RelWithDebInfo
# codesign: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
# notarize: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveNotarizationUser == 'true' }}
# codesignIdent: ${{ env.CODESIGN_IDENT }}
# installerIdent: ${{ env.CODESIGN_IDENT_INSTALLER }}
# codesignUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
# codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
#
# - name: Upload Build Artifact
# uses: actions/[email protected]
# with:
# name: ${{ env.PLUGIN_NAME }}-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}
# path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*-macos-${{ matrix.arch }}.pkg
linux-in-tree:
name: 'Linux'
runs-on: ${{ matrix.ubuntu }}
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
ubuntu:
- 'ubuntu-22.04'
permissions:
contents: write # To allow the creation of a release
steps:
- name: Checkout
uses: actions/[email protected]
with:
repository: obsproject/obs-studio
ref: ${{ env.OBS_VERSION }}
submodules: 'recursive'
- name: "Checkout plugin"
uses: actions/[email protected]
with:
path: plugins/${{ env.PLUGIN_NAME }}
submodules: 'recursive'
- name: "libzip: Information"
shell: bash
id: libzip-info
run: |
cd "${PWD}/plugins/${{ env.PLUGIN_NAME}}/vendor/libzip/"
git fetch --all
version=$(git describe --tags --long --abbrev=8 HEAD)
echo "libzip: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
- name: "libzip: Cache"
uses: actions/cache/restore@v3
id: libzip-cache
with:
path: |
build/libzip/distrib
key: libzip-linux-${{steps.libzip-info.outputs.version}}
- name: "libzip: Configure"
if: "(steps.libzip-cache.outputs.cache-hit != 'true')"
shell: bash
run: |
cmake -Hplugins/${{ env.PLUGIN_NAME}}/vendor/libzip -Bbuild/libzip/build \
-DCMAKE_INSTALL_PREFIX=build/libzip/distrib \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_BZIP2=OFF \
-DENABLE_LZMA=OFF \
-DENABLE_COMMONCRYPTO=OFF \
-DENABLE_GNUTLS=OFF \
-DENABLE_MBEDTLS=OFF \
-DENABLE_OPENSSL=OFF \
-DENABLE_WINDOWS_CRYPTO=OFF \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF
- name: "libzip: Build"
if: "(steps.libzip-cache.outputs.cache-hit != 'true')"
shell: bash
run: |
cmake --build build/libzip/build --config Release --target install
- name: "libzip: Save Cache"
uses: actions/cache/save@v3
with:
path: |
build/libzip/distrib
key: libzip-linux-${{steps.libzip-info.outputs.version}}
- name: Add plugin to obs cmake
shell: bash
run: echo "add_subdirectory(${{ env.PLUGIN_NAME }})" >> plugins/CMakeLists.txt
- name: Fetch Git Tags
run: git fetch --prune --tags --unshallow
- name: 'Install dependencies'
run: CI/linux/01_install_dependencies.sh --disable-pipewire
- name: 'Configure'
shell: bash
run: |
cmake -S . -B "${{ github.workspace }}/build/obs-studio" -G Ninja \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DLINUX_PORTABLE=OFF \
-DENABLE_AJA=OFF \
-DENABLE_NEW_MPEGTS_OUTPUT=OFF \
-DBUILD_CAPTIONS=OFF \
-DWITH_RTMPS=OFF \
-DBUILD_BROWSER=OFF \
-DBUILD_VIRTUALCAM=OFF \
-DBUILD_VST=OFF \
-DENABLE_PIPEWIRE=OFF \
-DENABLE_SCRIPTING=OFF \
-DLIBZIP_INCLUDE="${{ github.workspace }}/build/libzip/distrib/include" \
-DLIBZIP_INCLUDE_CONF="${{ github.workspace }}/build/libzip/distrib/include" \
-DLIBZIP_LIBRARY="${{ github.workspace }}/build/libzip/distrib/lib/libzip.a"
- name: 'Build'
shell: bash
run: |
cmake --build "./build/obs-studio"
- name: 'Package'
shell: bash
run: |
FILE_DATE=$(date +%Y-%m-%d)
FILE_NAME=${{ env.PLUGIN_NAME }}-${{ github.ref_name }}-${{ matrix.ubuntu }}.zip
echo "FILE_NAME=${FILE_NAME}" >> $GITHUB_ENV
mkdir -p ./${{ env.PLUGIN_NAME }}/bin/64bit/
mv ./build/obs-studio/plugins/${{ env.PLUGIN_NAME }}/${{ env.PLUGIN_NAME }}.so ./${{ env.PLUGIN_NAME }}/bin/64bit/${{ env.PLUGIN_NAME }}.so
mv ./plugins/${{ env.PLUGIN_NAME }}/data ./${{ env.PLUGIN_NAME }}/data
zip -r "${FILE_NAME}" ${{ env.PLUGIN_NAME }}
- name: 'Publish'
uses: actions/[email protected]
with:
name: '${{ env.FILE_NAME }}'
path: '*.zip'
- name: Release ZIP
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
fail_on_unmatched_files: true
files: |
*.zip
# - name: Publish zip FAILURE
# if: failure()
# uses: actions/[email protected]
# with:
# name: '${{ env.FILE_NAME }}-debug-files'
# path: build/*
windows-build:
name: 'Windows Build'
runs-on: [windows-latest]
strategy:
fail-fast: true
matrix:
target:
- x64
# - x86
include:
- target: x64
cmake_build: 'x64'
deps_ext: '64'
# - target: x86
# cmake_build: 'Win32'
# deps_ext: '32'
env:
QT_VERSION: '6.3.1'
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_SYSTEM_VERSION: "10.0.18363.657"
WINDOWS_DEPS_VERSION: '2022-08-02'
steps:
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Checkout obs
uses: actions/[email protected]
with:
repository: obsproject/obs-studio
ref: ${{ env.OBS_VERSION }}
submodules: 'recursive'
- name: Checkout plugin
uses: actions/[email protected]
with:
path: plugins/${{ env.PLUGIN_NAME}}
submodules: 'recursive'
- name: "zlib: Information"
shell: bash
id: zlib-info
run: |
cd "${PWD}/plugins/${{ env.PLUGIN_NAME}}/vendor/zlib-ng"
git fetch --all
version=$(git describe --tags --long --abbrev=8 HEAD)
echo "zlib: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
- name: "zlib: Cache"
uses: actions/cache/restore@v3
id: zlib-cache
with:
path: |
build/zlib/distrib
key: zlib-win-${{steps.zlib-info.outputs.version}}
- name: "zlib: Configure"
if: "steps.zlib-cache.outputs.cache-hit != 'true'"
shell: bash
run: |
cmake -Hplugins/${{ env.PLUGIN_NAME}}/vendor/zlib-ng -Bbuild/zlib/build \
-DCMAKE_INSTALL_PREFIX=build/zlib/distrib \
-DBIN_INSTALL_DIR=build/zlib/distrib/bin \
-DLIB_INSTALL_DIR=build/zlib/distrib/lib \
-DINC_INSTALL_DIR=build/zlib/distrib/include \
-DPKGCONFIG_INSTALL_DIR=build/zlib/distrib/lib/pkgconfig \
-DMAN_INSTALL_DIR=build/zlib/distrib/share/man \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DZLIB_COMPAT=ON \
-DZLIB_ENABLE_TESTS=OFF
- name: "zlib: Build"
if: "steps.zlib-cache.outputs.cache-hit != 'true'"
shell: bash
run: |
cmake --build build/zlib/build --config Release --target INSTALL
- name: "zlib: Save Cache"
if: "steps.zlib-cache.outputs.cache-hit != 'true'"
uses: actions/cache/save@v3
with:
path: build/zlib/build
key: zlib-win-${{steps.zlib-info.outputs.version}}
- name: "libzip: Information"
shell: bash
id: libzip-info
run: |
cd "${PWD}/plugins/${{ env.PLUGIN_NAME}}/vendor/libzip/"
git fetch --all
version=$(git describe --tags --long --abbrev=8 HEAD)
echo "libzip: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
- name: "libzip: Cache"
if: "steps.zlib-cache.outputs.cache-hit == 'true'"
uses: actions/cache/restore@v3
id: libzip-cache
with:
path: |
build/libzip/distrib
key: libzip-win-${{steps.zlib-info.outputs.version}}-${{steps.libzip-info.outputs.version}}
- name: "libzip: Configure"
if: "(steps.zlib-cache.outputs.cache-hit != 'true') || (steps.libzip-cache.outputs.cache-hit != 'true')"
shell: bash
run: |
cmake -Hplugins/${{ env.PLUGIN_NAME}}/vendor/libzip -Bbuild/libzip/build \
-DCMAKE_INSTALL_PREFIX=build/libzip/distrib \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_BZIP2=OFF \
-DENABLE_LZMA=OFF \
-DENABLE_COMMONCRYPTO=OFF \
-DENABLE_GNUTLS=OFF \
-DENABLE_MBEDTLS=OFF \
-DENABLE_OPENSSL=OFF \
-DENABLE_WINDOWS_CRYPTO=OFF \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF \
-DZLIB_INCLUDE_DIR=build/zlib/distrib/include \
-DZLIB_LIBRARY_DEBUG=build/zlib/distrib/lib/zlibstatic.lib \
-DZLIB_LIBRARY_RELEASE=build/zlib/distrib/lib/zlibstatic.lib
- name: "libzip: Build"
if: "(steps.zlib-cache.outputs.cache-hit != 'true') || (steps.libzip-cache.outputs.cache-hit != 'true')"
shell: bash
run: |
cmake --build build/libzip/build --config Release --target INSTALL
- name: "libzip: Save Cache"
uses: actions/cache/save@v3
with:
path: |
build/libzip/distrib
key: libzip-win-${{steps.zlib-info.outputs.version}}-${{steps.libzip-info.outputs.version}}
- name: Add plugin to obs cmake
shell: cmd
run: echo add_subdirectory(${{ env.PLUGIN_NAME }}) >> plugins/CMakeLists.txt
- name: Remove un-needed plugins for this build
shell: pwsh
run: |
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(aja\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(decklink\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(image-source\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-ffmpeg\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-filters\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-libfdk\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-outputs\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-qsv11\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-transitions\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-vst\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(obs-x264\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(rtmp-services\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(text-freetype2\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(vlc-video\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(win-capture\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(win-dshow\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(win-ivcam\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(win-mf\)' -NotMatch)
Set-Content -Path "plugins\CMakeLists.txt" -Value (get-content -Path "plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(win-wasapi\)' -NotMatch)
type plugins\CMakeLists.txt
echo "------------------------------------------------------------------------------------"
Set-Content -Path "UI\frontend-plugins\CMakeLists.txt" -Value (get-content -Path "UI\frontend-plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(aja-output-ui\)' -NotMatch)
Set-Content -Path "UI\frontend-plugins\CMakeLists.txt" -Value (get-content -Path "UI\frontend-plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(decklink-output-ui\)' -NotMatch)
Set-Content -Path "UI\frontend-plugins\CMakeLists.txt" -Value (get-content -Path "UI\frontend-plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(frontend-tools\)' -NotMatch)
Set-Content -Path "UI\frontend-plugins\CMakeLists.txt" -Value (get-content -Path "UI\frontend-plugins\CMakeLists.txt" | Select-String -Pattern 'add_subdirectory\(decklink-captions\)' -NotMatch)
type UI\frontend-plugins\CMakeLists.txt
- name: Fetch Git Tags
run: git fetch --prune --tags --unshallow
- name: 'Install prerequisite: QT'
run: |
curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.WINDOWS_DEPS_VERSION }}/windows-deps-qt6-${{ env.WINDOWS_DEPS_VERSION }}-${{ matrix.target }}.zip -f --retry 5 -C -
7z x windows-deps-qt6-${{ env.WINDOWS_DEPS_VERSION }}-${{ matrix.target }}.zip -o"${{ github.workspace }}/cmbuild/deps"
- name: 'Install prerequisite: Pre-built dependencies'
run: |
curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.WINDOWS_DEPS_VERSION }}/windows-deps-${{ env.WINDOWS_DEPS_VERSION }}-${{ matrix.target }}.zip -f --retry 5 -C -
7z x windows-deps-${{ env.WINDOWS_DEPS_VERSION }}-${{ matrix.target }}.zip -o"${{ github.workspace }}/cmbuild/deps"
- name: Configure
shell: bash
run: |
mkdir ./package
mkdir ./installer
mkdir ./installer/media
cmake -S . -B "${{ github.workspace }}/build/obs-studio" \
-G"${{ env.CMAKE_GENERATOR }}" \
-DCMAKE_PREFIX_PATH:PATH="${{ github.workspace }}/cmbuild/deps" \
-A"${{ matrix.cmake_build }}" \
-DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" \
-DBUILD_BROWSER=false \
-DBUILD_VST=false \
-DBUILD_VIRTUALCAM=false \
-DBUILD_CAPTIONS=false \
-DCOMPILE_D3D12_HOOK=false \
-DENABLE_SCRIPTING=false \
-DDepsPath="${{ github.workspace }}/cmbuild/deps" \
-DDepsPath${{ matrix.deps_ext }}="${{ github.workspace }}/cmbuild/deps" \
-DQTDIR="${{ github.workspace }}/cmbuild/deps/qt6" \
-DCOPIED_DEPENDENCIES=FALSE \
-DCOPY_DEPENDENCIES=TRUE \
-DENABLE_PLUGINS=TRUE \
-DDISABLE_PLUGINS=FALSE \
-DENABLE_BROWSER=FALSE \
-DENABLE_WEBSOCKET=FALSE \
-DZLIB_INCLUDE="${{ github.workspace }}/build/zlib/distrib/include" \
-DZLIB_LIBRARY="${{ github.workspace }}/build/zlib/distrib/lib/zlibstatic.lib" \
-DLIBZIP_INCLUDE="${{ github.workspace }}/build/libzip/distrib/include" \
-DLIBZIP_INCLUDE_CONF="${{ github.workspace }}/build/libzip/distrib/include" \
-DLIBZIP_LIBRARY="${{ github.workspace }}/build/libzip/distrib/lib/zip.lib"
- name: 'Build'
run: msbuild /m /p:Configuration=RelWithDebInfo .\build\obs-studio\obs-studio.sln
- name: Package
if: success()
run: |
$env:FILE_NAME="${{ env.PLUGIN_NAME }}-${{ github.sha }}-windows-${{ matrix.target }}"
echo "FILE_NAME=${env:FILE_NAME}" >> ${env:GITHUB_ENV}
robocopy .\build\obs-studio\rundir\RelWithDebInfo\obs-plugins\${{ matrix.deps_ext }}bit\ .\package\obs-plugins\${{ matrix.deps_ext }}bit ${{ env.PLUGIN_NAME }}.* /E /XF .gitignore
robocopy .\build\obs-studio\rundir\RelWithDebInfo\data\obs-plugins\${{ env.PLUGIN_NAME }}\ .\package\data\obs-plugins\${{ env.PLUGIN_NAME }}\ /E /XF .gitignore
copy .\build\obs-studio\plugins\${{ env.PLUGIN_NAME }}\installer.iss .\installer\installer.iss
robocopy .\plugins\${{ env.PLUGIN_NAME}}\media\ .\installer\media\ /E /XF .gitignore
exit 0
- name: Publish zip
if: success()
uses: actions/[email protected]
with:
name: '${{ env.FILE_NAME }}'
path: package/*
# - name: Publish zip 2
# if: failure()
# uses: actions/[email protected]
# with:
# name: '${{ env.FILE_NAME }}-debug-files'
# path: build/*
- name: Publish Installer Files
if: success()
uses: actions/[email protected]
with:
name: 'installer-files'
path: installer/*
windows-package:
name: 'Windows Package'
runs-on: [windows-latest]
needs: [windows-build]
permissions:
contents: write # To allow the creation of a release
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Init
if: success()
run: |
mkdir ./package
$env:FILE_DATE=(Get-Date -UFormat "%F")
$env:FILE_NAME="${{ env.PLUGIN_NAME }}-${env:FILE_DATE}-${{ github.sha }}-windows"
echo "FILE_NAME=${env:FILE_NAME}" >> ${env:GITHUB_ENV}
$env:FILE_NAME_X86="${{ env.PLUGIN_NAME }}-${{ github.sha }}-windows-x86"
echo "FILE_NAME_X86=${env:FILE_NAME_X86}" >> ${env:GITHUB_ENV}
$env:FILE_NAME_X64="${{ env.PLUGIN_NAME }}-${{ github.sha }}-windows-x64"
echo "FILE_NAME_X64=${env:FILE_NAME_X64}" >> ${env:GITHUB_ENV}
$env:RELEASE_FILE_NAME_X64="${{ env.PLUGIN_NAME }}-${{ github.ref_name }}-windows-x64"
echo "RELEASE_FILE_NAME_X64=${env:RELEASE_FILE_NAME_X64}" >> ${env:GITHUB_ENV}
# - name: Retrieve x86 build
# uses: actions/[email protected]
# with:
# name: '${{ env.FILE_NAME_X86 }}'
# path: ./package
- name: Retrieve x64 build
uses: actions/[email protected]
with:
name: '${{ env.FILE_NAME_X64 }}'
path: ./package
- name: Retrieve installer files
uses: actions/[email protected]
with:
name: 'installer-files'
path: .
- name: Create Code Signing Certificate
if: success() && github.event_name != 'pull_request'
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WINDOWS_CERTIFICATE }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
# - name: Code Sign 32
# if: success() && github.event_name != 'pull_request'
# run: |
# & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.20348.0/x86/signtool.exe' sign /fd certHash /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /t http://timestamp.comodoca.com/authenticode .\package\obs-plugins\32bit\${{ env.PLUGIN_NAME }}.dll
- name: Code Sign 64
if: success() && github.event_name != 'pull_request'
run: |
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.20348.0/x64/signtool.exe' sign /fd certHash /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /t http://timestamp.comodoca.com/authenticode .\package\obs-plugins\64bit\${{ env.PLUGIN_NAME }}.dll
- name: ZIP plugin files
if: startsWith(github.ref, 'refs/tags/')
run: |
7z a "${{ env.RELEASE_FILE_NAME_X64 }}.zip" ".\package\*"
- name: Publish zip
if: success()
uses: actions/[email protected]
with:
name: '${{ env.FILE_NAME }}'
path: package/*
- name: "Package Installer (Prereqs)"
run: |
curl "-kL" "https://github.com/Xaymar/msvc-redist-helper/releases/download/0.1/msvc-redist-helper-64.exe" "-f" "--retry" "5" "-o" "msvc-redist-helper.exe"
curl "-kL" "https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe" "-f" "--retry" "5" "-o" "inno.exe"
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
- name: "Package Installer (Compile)"
run: |
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' /Qp ".\installer.iss"
- name: Code Sign Installer
if: success() && github.event_name != 'pull_request'
run: |
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.20348.0/x64/signtool.exe' sign /fd certHash /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /t http://timestamp.comodoca.com/authenticode .\package\${{ env.PLUGIN_NAME }}-installer.exe
mv ".\package\${{ env.PLUGIN_NAME }}-installer.exe" ".\package\${{ env.RELEASE_FILE_NAME_X64 }}-installer.exe"
- name: Publish installer
if: success()
uses: actions/[email protected]
with:
name: '${{ env.RELEASE_FILE_NAME_X64 }}-installer'
path: package/*.exe
- name: Release installer
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
fail_on_unmatched_files: true
files: |
package/*
${{ env.RELEASE_FILE_NAME_X64 }}.zip
- name: Remove temp artifacts
uses: geekyeggo/[email protected]
with:
name: "${{ env.FILE_NAME_X64 }}\ninstaller-files"