dispatch.yaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. name: Dispatch
  2. run-name: Dispatched Repository Actions - ${{ inputs.job }} ⌛️
  3. on:
  4. workflow_dispatch:
  5. inputs:
  6. job:
  7. description: Dispatch job to run
  8. required: true
  9. type: choice
  10. options:
  11. - steam
  12. - services
  13. - translations
  14. - documentation
  15. ref:
  16. description: GitHub reference to use for job
  17. type: string
  18. required: false
  19. customAssetWindows:
  20. description: Custom Windows build for Steam Upload
  21. type: string
  22. required: false
  23. customAssetMacOSApple:
  24. description: Custom macOS Apple Silicon build for Steam Upload
  25. type: string
  26. required: false
  27. customAssetMacOSIntel:
  28. description: Custom macOS Intel build for Steam Upload
  29. type: string
  30. required: false
  31. permissions:
  32. contents: write
  33. jobs:
  34. services-validation:
  35. name: Validate Services 🕵️
  36. if: github.repository_owner == 'obsproject' && inputs.job == 'services'
  37. runs-on: macos-13
  38. permissions:
  39. checks: write
  40. contents: write
  41. pull-requests: write
  42. steps:
  43. - uses: actions/checkout@v3
  44. - name: Check for Defunct Services 📉
  45. uses: ./.github/actions/services-validator
  46. with:
  47. repositorySecret: ${{ secrets.GITHUB_TOKEN }}
  48. runSchemaChecks: true
  49. runServiceChecks: true
  50. createPullRequest: true
  51. download-language-files:
  52. name: Download Language Files 🌐
  53. if: github.repository_owner == 'obsproject' && inputs.job == 'translations'
  54. runs-on: ubuntu-22.04
  55. env:
  56. CROWDIN_PAT: ${{ secrets.CROWDIN_SYNC_CROWDIN_PAT }}
  57. steps:
  58. - uses: actions/checkout@v3
  59. with:
  60. submodules: recursive
  61. token: ${{ secrets.CROWDIN_SYNC_GITHUB_PAT }}
  62. fetch-depth: 0
  63. - uses: obsproject/obs-crowdin-sync/download@30b5446e3b5eb19595aa68a81ddf896a857302cf
  64. steam-upload:
  65. name: Upload Steam Builds 🚂
  66. if: github.repository_owner == 'obsproject' && inputs.job == 'steam'
  67. runs-on: macos-13
  68. steps:
  69. - uses: actions/checkout@v3
  70. - uses: ./.github/actions/steam-upload
  71. with:
  72. steamSecret: ${{ secrets.STEAM_SHARED_SECRET }}
  73. steamUser: ${{ secrets.STEAM_USER }}
  74. steamPassword: ${{ secrets.STEAM_PASSWORD }}
  75. tagName: ${{ inputs.ref }}
  76. customAssetWindows: ${{ inputs.customAssetWindows }}
  77. customAssetMacOSApple: ${{ inputs.customAssetMacOSApple }}
  78. customAssetMacOSIntel: ${{ inputs.customAssetMacOSIntel }}
  79. workflowSecret: ${{ github.token }}
  80. preview: false
  81. update-documentation:
  82. name: Update Documentation 📖
  83. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  84. runs-on: ubuntu-22.04
  85. steps:
  86. - uses: actions/checkout@v3
  87. - name: Get Commit Information 🆔
  88. id: setup
  89. run: |
  90. : Get Commit Hash 🆔
  91. echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
  92. - uses: ./.github/actions/generate-docs
  93. with:
  94. commitHash: ${{ steps.checks.setup.commitHash }}
  95. update-documentation-cloudflare:
  96. name: Update Documentation for Cloudflare ☁️
  97. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  98. runs-on: ubuntu-22.04
  99. steps:
  100. - uses: actions/checkout@v3
  101. - name: Get Commit Information 🆔
  102. id: setup
  103. run: |
  104. : Get Commit Hash 🆔
  105. echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
  106. - uses: ./.github/actions/generate-docs
  107. with:
  108. commitHash: ${{ steps.checks.setup.commitHash }}
  109. disableLinkExtensions: true
  110. deploy-documentation:
  111. name: Deploy Documentation to Cloudflare ☁️
  112. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  113. runs-on: ubuntu-22.04
  114. needs: update-documentation-cloudflare
  115. defaults:
  116. run:
  117. shell: bash
  118. environment:
  119. name: cf-pages-deploy
  120. steps:
  121. - name: Get Commit Information 🆔
  122. id: setup
  123. run: |
  124. : Get Commit Hash 🆔
  125. echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
  126. - uses: actions/download-artifact@v3
  127. with:
  128. name: OBS Studio Docs (No Extensions) ${{ steps.setup.outputs.commitHash }}
  129. path: docs
  130. - name: Set Up Redirects 🔄
  131. run: |
  132. : Set Up Redirects 🔄
  133. if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
  134. echo "/previous/27.2 https://obsproject.com/docs/27.2 302" >> docs/_redirects
  135. echo "/previous/:major.:minor https://:major-:minor.${{ vars.CF_PAGES_PROJECT }}.pages.dev 302" >> docs/_redirects
  136. - name: Publish to Live Page
  137. uses: cloudflare/wrangler-action@4c10c1822abba527d820b29e6333e7f5dac2cabd
  138. with:
  139. workingDirectory: docs
  140. apiToken: ${{ secrets.CF_API_TOKEN }}
  141. accountId: ${{ secrets.CF_ACCOUNT_ID }}
  142. command: pages publish . --project-name=${{ vars.CF_PAGES_PROJECT }} --commit-hash='${{ steps.setup.outputs.commitHash }}'