main.yml 18 KB

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