dispatch.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. - uses: ./.github/actions/generate-docs
  88. update-documentation-cloudflare:
  89. name: Update Documentation for Cloudflare ☁️
  90. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  91. runs-on: ubuntu-22.04
  92. steps:
  93. - uses: actions/checkout@v3
  94. - uses: ./.github/actions/generate-docs
  95. with:
  96. disableLinkExtensions: true
  97. deploy-documentation:
  98. name: Deploy Documentation to Cloudflare ☁️
  99. if: github.repository_owner == 'obsproject' && inputs.job == 'documentation'
  100. runs-on: ubuntu-22.04
  101. needs: update-documentation-cloudflare
  102. defaults:
  103. run:
  104. shell: bash
  105. environment:
  106. name: cf-pages-deploy
  107. steps:
  108. - name: Get Commit Information 🆔
  109. id: setup
  110. run: |
  111. : Get Commit Hash 🆔
  112. echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
  113. - uses: actions/download-artifact@v3
  114. with:
  115. name: OBS Studio Docs (No Extensions) ${{ steps.setup.outputs.commitHash }}
  116. path: docs
  117. - name: Publish to Live Page
  118. uses: cloudflare/wrangler-action@4c10c1822abba527d820b29e6333e7f5dac2cabd
  119. with:
  120. workingDirectory: docs
  121. apiToken: ${{ secrets.CF_API_TOKEN }}
  122. accountId: ${{ secrets.CF_ACCOUNT_ID }}
  123. command: pages publish . --project-name=${{ vars.CF_PAGES_PROJECT }} --commit-hash='${{ steps.setup.outputs.commitHash }}'