main.yml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. name: 'BUILD'
  2. on:
  3. push:
  4. paths-ignore: ['**.md']
  5. branches:
  6. - master
  7. - 'release/**'
  8. tags: ['*']
  9. pull_request:
  10. paths-ignore: ['**.md']
  11. branches: [master]
  12. env:
  13. CACHE_REVISION: '004'
  14. CEF_BUILD_VERSION_MAC: '4638'
  15. CEF_HASH_MAC_X86_64: '2fe4cc39b1373b85086e4030dedd2a250d5dbbed8c2f8780002d6cd6214b6bc2'
  16. CEF_HASH_MAC_ARM64: '27809aac427b9c97b0dadcab04371c5f8211f36c6f3e1caa00822de89c5ed249'
  17. CEF_BUILD_VERSION_LINUX: '4638'
  18. CEF_BUILD_VERSION_WIN: '4638'
  19. QT_VERSION_MAC: '5.15.2'
  20. QT_HASH_MAC_X86_64: '35a58fee8dfd70d3d2dcc0ae0b77132c04a451c6f041a02dc41b207b375fc74b'
  21. QT_HASH_MAC_ARM64: 'e99146b9c7775c245a2d22f2ef24fc111fccd71bad0f03b64db707124ffb8707'
  22. QT_VERSION_WIN: '5.15.2'
  23. DEPS_VERSION_MAC: '2022-02-13'
  24. DEPS_HASH_MAC_X86_64: '1a8715d66e664b857942deaded0dc46c4f6cd22e88f01ed1188f3bd3fcf632c4'
  25. DEPS_HASH_MAC_ARM64: '2cfcaf05765400c696908f242aea87b6e1848e1a48cd3edc2eb7f8cb249c9d48'
  26. DEPS_VERSION_WIN: '2022-03-16'
  27. VLC_VERSION_MAC: '3.0.8'
  28. VLC_HASH_MAC: 'e0149ef4a20a19b9ecd87309c2d27787ee3f47dfd47c6639644bc1f6fd95bdf6'
  29. VLC_VERSION_WIN: '3.0.0-git'
  30. TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
  31. TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
  32. RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }}
  33. RESTREAM_HASH: ${{ secrets.RESTREAM_HASH }}
  34. YOUTUBE_CLIENTID: ${{ secrets.YOUTUBE_CLIENTID }}
  35. YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
  36. YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
  37. YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
  38. jobs:
  39. clang_check:
  40. name: '01 - Code Format Check'
  41. runs-on: [ubuntu-latest]
  42. steps:
  43. - name: 'Checkout'
  44. uses: actions/checkout@v3
  45. with:
  46. submodules: 'recursive'
  47. - name: 'Install clang-format'
  48. run: sudo apt-get install -y clang-format-12
  49. - name: 'Run clang-format'
  50. run: |
  51. ./CI/check-format.sh
  52. ./CI/check-changes.sh
  53. - name: 'Install cmake-format'
  54. run: sudo pip install cmakelang
  55. - name: 'Run cmake-format'
  56. run: |
  57. ./CI/check-cmake.sh
  58. macos_build:
  59. name: '02 - macOS'
  60. runs-on: [macos-11]
  61. strategy:
  62. matrix:
  63. arch: ['x86_64', 'arm64']
  64. if: always()
  65. needs: [clang_check]
  66. env:
  67. MACOSX_DEPLOYMENT_TARGET_X86_64: '10.13'
  68. MACOSX_DEPLOYMENT_TARGET_ARM64: '11.0'
  69. SPARKLE_VERSION: '1.26.0'
  70. SPARKLE_HASH: '8312cbf7528297a49f1b97692c33cb8d33254c396dc51be394e9484e4b6833a0'
  71. BLOCKED_FORMULAS: 'speexdsp curl php composer'
  72. CODESIGN_IDENT: '-'
  73. HAVE_CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY != '' && secrets.MACOS_SIGNING_CERT != '' }}
  74. defaults:
  75. run:
  76. shell: bash
  77. working-directory: 'obs-studio'
  78. steps:
  79. - name: 'Checkout'
  80. uses: actions/checkout@v3
  81. with:
  82. submodules: 'recursive'
  83. path: 'obs-studio'
  84. fetch-depth: 0
  85. - name: 'Check for Github Labels'
  86. if: github.event_name == 'pull_request'
  87. run: |
  88. if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
  89. echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
  90. else
  91. echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
  92. fi
  93. echo "CACHE_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
  94. - name: 'Restore ccache from cache'
  95. id: ccache-cache
  96. uses: actions/[email protected]
  97. env:
  98. CACHE_NAME: 'ccache-cache'
  99. with:
  100. path: ${{ github.workspace }}/.ccache
  101. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ matrix.arch }}-${{ env.CACHE_DATE }}
  102. - name: 'Restore Chromium Embedded Framework from cache'
  103. id: cef-cache
  104. uses: actions/[email protected]
  105. env:
  106. CACHE_NAME: 'cef-cache'
  107. with:
  108. path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_MAC }}_macos_${{ matrix.arch }}
  109. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_MAC }}-${{ matrix.arch }}-${{ env.CACHE_REVISION }}
  110. - name: 'Restore VLC dependency from cache'
  111. id: vlc-cache
  112. uses: actions/[email protected]
  113. env:
  114. CACHE_NAME: 'vlc-cache'
  115. with:
  116. path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_MAC }}
  117. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_MAC }}-${{ env.CACHE_REVISION }}
  118. - name: 'Restore Sparkle dependency from cache'
  119. id: sparkle-cache
  120. uses: actions/[email protected]
  121. env:
  122. CACHE_NAME: 'sparkle-cache'
  123. with:
  124. path: ${{ github.workspace }}/obs-build-dependencies/obs-deps/lib/Sparkle.framework
  125. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.SPARKLE_VERSION }}-${{ env.CACHE_REVISION }}
  126. - name: 'Setup build environment'
  127. run: |
  128. REMOVE_FORMULAS=""
  129. for FORMULA in ${{ env.BLOCKED_FORMULAS }}; do
  130. if [ -d "/usr/local/opt/${FORMULA}" ]; then
  131. REMOVE_FORMULAS="${REMOVE_FORMULAS}${FORMULA} "
  132. fi
  133. done
  134. if [ -n "${REMOVE_FORMULAS}" ]; then
  135. brew uninstall ${REMOVE_FORMULAS}
  136. fi
  137. - name: 'Install dependencies'
  138. env:
  139. RESTORED_VLC: ${{ steps.vlc-cache.outputs.cache-hit }}
  140. RESTORED_SPARKLE: ${{ steps.sparkle-cache.outputs.cache-hit }}
  141. RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
  142. run: CI/macos/01_install_dependencies.sh --architecture "${{ matrix.arch }}"
  143. - name: 'Install Apple Developer Certificate'
  144. if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && env.HAVE_CODESIGN_IDENTITY == 'true' }}
  145. uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
  146. with:
  147. p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
  148. p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
  149. - name: 'Set Signing Identity'
  150. if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && env.HAVE_CODESIGN_IDENTITY == 'true' }}
  151. run: |
  152. echo "CODESIGN_IDENT=${{ secrets.MACOS_SIGNING_IDENTITY }}" >> $GITHUB_ENV
  153. echo "BUILD_FOR_DISTRIBUTION=ON" >> $GITHUB_ENV
  154. - name: 'Build OBS'
  155. run: CI/macos/02_build_obs.sh --codesign --architecture "${{ matrix.arch }}"
  156. - name: 'Run tests'
  157. if: ${{ success() && matrix.arch == 'x86_64' }}
  158. run: cmake --build build -t test
  159. - name: 'Create build artifact'
  160. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  161. run: |
  162. CI/macos/03_package_obs.sh --codesign --architecture "${{ matrix.arch }}"
  163. ARTIFACT_NAME=$(basename $(/usr/bin/find build -type f -name "obs-studio-*.dmg" -depth 1 | head -1))
  164. echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
  165. - name: 'Upload build Artifact'
  166. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  167. uses: actions/upload-artifact@v3
  168. with:
  169. name: 'obs-macos-${{ matrix.arch }}'
  170. path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'
  171. linux_build:
  172. name: '02 - Linux'
  173. runs-on: ${{ matrix.ubuntu }}
  174. strategy:
  175. matrix:
  176. ubuntu: ['ubuntu-20.04', 'ubuntu-18.04']
  177. if: always()
  178. needs: [clang_check]
  179. defaults:
  180. run:
  181. shell: bash
  182. working-directory: 'obs-studio'
  183. env:
  184. BUILD_FOR_DISTRIBUTION: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
  185. steps:
  186. - name: 'Checkout'
  187. uses: actions/checkout@v3
  188. with:
  189. submodules: 'recursive'
  190. path: 'obs-studio'
  191. fetch-depth: 0
  192. - name: 'Check for Github Labels'
  193. if: github.event_name == 'pull_request'
  194. run: |
  195. if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
  196. echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
  197. else
  198. echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
  199. fi
  200. echo "CACHE_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
  201. - name: 'Restore ccache from cache'
  202. id: ccache-cache
  203. uses: actions/[email protected]
  204. env:
  205. CACHE_NAME: 'ccache-cache'
  206. with:
  207. path: ${{ github.workspace }}/.ccache
  208. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ matrix.ubuntu }}-${{ env.CACHE_DATE }}
  209. - name: 'Restore Chromium Embedded Framework from cache'
  210. id: cef-cache
  211. uses: actions/[email protected]
  212. env:
  213. CACHE_NAME: 'cef-cache'
  214. with:
  215. path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_LINUX }}_linux64
  216. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_LINUX }}-${{ env.CACHE_REVISION }}
  217. - name: 'Install dependencies'
  218. env:
  219. RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
  220. run: CI/linux/01_install_dependencies.sh --disable-pipewire
  221. - name: 'Build OBS'
  222. run: CI/linux/02_build_obs.sh --disable-pipewire
  223. - name: 'Run tests'
  224. if: success()
  225. run: cmake --build build -t test
  226. - name: 'Create build artifact'
  227. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  228. run: |
  229. CI/linux/03_package_obs.sh
  230. ARTIFACT_NAME=$(basename $(/usr/bin/find build -maxdepth 1 -type f -name "obs-studio-*.deb" | sort -rn | head -1))
  231. echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
  232. - name: 'Upload build Artifact'
  233. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  234. uses: actions/upload-artifact@v3
  235. with:
  236. name: 'obs-linux-${{ matrix.ubuntu }}-deb'
  237. path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'
  238. windows_build:
  239. name: '02 - Windows'
  240. runs-on: [windows-2019]
  241. needs: [clang_check]
  242. if: always()
  243. strategy:
  244. matrix:
  245. arch: [64, 32]
  246. env:
  247. CMAKE_GENERATOR: 'Visual Studio 16 2019'
  248. CMAKE_SYSTEM_VERSION: '10.0.18363.657'
  249. VIRTUALCAM-GUID: 'A3FCE0F5-3493-419F-958A-ABA1250EC20B'
  250. BUILD_FOR_DISTRIBUTION: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
  251. defaults:
  252. run:
  253. working-directory: 'obs-studio'
  254. steps:
  255. - name: 'Checkout'
  256. uses: actions/checkout@v3
  257. with:
  258. submodules: 'recursive'
  259. path: 'obs-studio'
  260. fetch-depth: 0
  261. - name: 'Add msbuild to PATH'
  262. uses: microsoft/[email protected]
  263. - name: 'Check for Github Labels'
  264. if: github.event_name == 'pull_request'
  265. run: |
  266. $LabelFound = try { (Invoke-RestMethod -Authentication 'Bearer' -Token (ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText) -Uri "${{ github.event.pull_request.url }}" -UseBasicParsing).labels.name.contains("Seeking Testers") } catch { $false }
  267. Write-Output "SEEKING_TESTERS=$(if( $LabelFound -eq $true ) { 1 } else { 0 })" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
  268. - name: 'Restore VLC dependency from cache'
  269. id: vlc-cache
  270. uses: actions/[email protected]
  271. env:
  272. CACHE_NAME: 'vlc-cache'
  273. with:
  274. path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_WIN }}
  275. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_WIN }}-${{ env.CACHE_REVISION }}
  276. - name: 'Restore Chromium Embedded Framework from cache'
  277. id: cef-cache
  278. uses: actions/[email protected]
  279. env:
  280. CACHE_NAME: 'cef-cache'
  281. with:
  282. path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_WIN }}_windows${{ matrix.arch }}_minimal
  283. key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_WIN }}-${{ env.CACHE_REVISION }}
  284. - name: 'Install dependencies'
  285. env:
  286. RESTORED_VLC: ${{ steps.vlc-cache.outputs.cache-hit }}
  287. RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
  288. run: CI/windows/01_install_dependencies.ps1 -BuildArch ${{ matrix.arch }}-bit
  289. - name: 'Build OBS'
  290. run: CI/windows/02_build_obs.ps1 -BuildArch ${{ matrix.arch }}-bit
  291. - name: 'Create build artifact'
  292. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  293. run: |
  294. CI/windows/03_package_obs.ps1 -BuildArch ${{ matrix.arch }}-bit -Package
  295. $ArtifactName = Get-ChildItem -filter "OBS-Studio-*-Win${{ matrix.arch }}.zip" -File
  296. Write-Output "FILE_NAME=${ArtifactName}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
  297. - name: 'Upload build artifact'
  298. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  299. uses: actions/upload-artifact@v3
  300. with:
  301. name: 'obs-win${{ matrix.arch }}'
  302. path: '${{ env.FILE_NAME }}'
  303. linux_package:
  304. name: '02 - Flatpak Bundle'
  305. runs-on: [ubuntu-latest]
  306. needs: [clang_check]
  307. if: always()
  308. defaults:
  309. run:
  310. shell: bash
  311. container:
  312. image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
  313. options: --privileged
  314. steps:
  315. - name: 'Check for Github Labels'
  316. if: github.event_name == 'pull_request'
  317. run: |
  318. if ! /usr/bin/command -v "jq" >/dev/null 2>&1; then sudo dnf install -y -q jq; fi
  319. if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
  320. echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
  321. else
  322. echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
  323. fi
  324. - name: 'Checkout'
  325. uses: actions/checkout@v3
  326. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  327. with:
  328. submodules: 'recursive'
  329. fetch-depth: 0
  330. - name: 'Setup build environment'
  331. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  332. run: |
  333. echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
  334. echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
  335. echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
  336. - name: Build Flatpak Manifest
  337. uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
  338. if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
  339. with:
  340. bundle: obs-studio-flatpak-${{ github.sha }}.flatpak
  341. manifest-path: CI/flatpak/com.obsproject.Studio.json
  342. cache-key: flatpak-builder-${{ github.sha }}
  343. windows_package:
  344. name: '03 - Windows Installer'
  345. runs-on: [windows-latest]
  346. needs: [windows_build]
  347. if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
  348. env:
  349. BUILD_FOR_DISTRIBUTION: 'ON'
  350. steps:
  351. - name: 'Checkout'
  352. uses: actions/checkout@v3
  353. - name: 'Add msbuild to PATH'
  354. uses: microsoft/[email protected]
  355. - name: 'Download 64-bit artifact'
  356. uses: actions/download-artifact@v3
  357. with:
  358. name: 'obs-win64'
  359. - name: 'Download 32-bit artifact'
  360. uses: actions/download-artifact@v3
  361. with:
  362. name: 'obs-win32'
  363. - name: 'Unpack Windows build artifacts'
  364. run: |
  365. if (!(Test-Path install_temp)) {
  366. $null = New-Item -ItemType Directory -Force -Path install_temp
  367. }
  368. Expand-Archive -Path "$(Get-ChildItem -filter "OBS-Studio-*-Win32.zip" -File)" -DestinationPath install_temp
  369. Expand-Archive -Path "$(Get-ChildItem -filter "OBS-Studio-*-Win64.zip" -File)" -Force -DestinationPath install_temp
  370. CI/windows/03_package_obs.ps1 -CombinedArchs -Package
  371. $ArtifactName = (Get-ChildItem -filter "OBS-Studio-*-Windows.zip" -File).Name
  372. Write-Output "FILE_NAME=${ArtifactName}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
  373. - name: 'Upload build artifact'
  374. uses: actions/upload-artifact@v3
  375. with:
  376. name: 'obs-windows'
  377. path: '${{ env.FILE_NAME }}'
  378. macos_release:
  379. name: '03 - macOS notarized image'
  380. runs-on: [macos-11]
  381. needs: [macos_build]
  382. env:
  383. HAVE_CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY != '' && secrets.MACOS_SIGNING_CERT != '' }}
  384. BUILD_FOR_DISTRIBUTION: 'ON'
  385. if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
  386. strategy:
  387. matrix:
  388. arch: ['x86_64', 'arm64']
  389. defaults:
  390. run:
  391. shell: bash
  392. steps:
  393. - name: 'Checkout'
  394. if: env.HAVE_CODESIGN_IDENTITY == 'true'
  395. uses: actions/checkout@v3
  396. - name: 'Download artifact'
  397. if: env.HAVE_CODESIGN_IDENTITY == 'true'
  398. uses: actions/download-artifact@v3
  399. with:
  400. name: 'obs-macos-${{ matrix.arch }}'
  401. - name: 'Install Apple Developer Certificate'
  402. if: env.HAVE_CODESIGN_IDENTITY == 'true'
  403. uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
  404. with:
  405. p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
  406. p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
  407. - name: 'Create disk image for distribution'
  408. if: env.HAVE_CODESIGN_IDENTITY == 'true'
  409. env:
  410. CODESIGN_IDENT: ${{ secrets.MACOS_SIGNING_IDENTITY }}
  411. CODESIGN_IDENT_USER: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
  412. CODESIGN_IDENT_PASS: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
  413. run: |
  414. ARTIFACT_NAME=$(/usr/bin/find . -type f -name "obs-studio-*.dmg" -depth 1 | head -1)
  415. CI/macos/03_package_obs.sh --notarize-image ${ARTIFACT_NAME}
  416. echo "FILE_NAME=$(basename ${ARTIFACT_NAME})" >> $GITHUB_ENV
  417. - name: 'Upload build Artifact'
  418. if: env.HAVE_CODESIGN_IDENTITY == 'true'
  419. uses: actions/upload-artifact@v3
  420. with:
  421. name: 'obs-macos-${{ matrix.arch }}-notarized'
  422. path: '${{ github.workspace }}/${{ env.FILE_NAME }}'