Skip to content

Commit

Permalink
CI: Add nightly upload of changed language files
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav authored and RytoEX committed Aug 24, 2023
1 parent a4bef32 commit 56e3869
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,48 @@ jobs:
needs: cache-cleanup
secrets: inherit

upload-language-files:
name: Upload Language Files 🌐
if: github.repository_owner == 'obsproject' && github.ref_name == 'master'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Check Nightly Runs ☑️
id: nightly-checks
env:
GH_TOKEN: ${{ github.token }}
run: |
: Check Nightly Runs ☑️
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
local last_nightly=$(gh run list --workflow scheduled.yaml --limit 2 --json headSha --jq '.[1].headSha')
if [[ "${GITHUB_SHA}" == "${last_nightly}" ]] {
print "passed=false" >> $GITHUB_OUTPUT
} else {
print "passed=true" >> $GITHUB_OUTPUT
print "lastNightly=${last_nightly}" >> $GITHUB_OUTPUT
}
- name: Check for Changed Files ✅
uses: ./.github/actions/check-changes
if: fromJSON(steps.nightly-checks.outputs.passed)
id: checks
with:
baseRef: ${{ steps.nighty-checks.outputs.lastNightly }}
checkGlob: '**/en-US.ini'

- name: Upload US English Language Files 🇺🇸
if: fromJSON(steps.checks.outputs.hasChangedFiles) && fromJSON(steps.nightly-checks.outputs.passed)
uses: obsproject/obs-crowdin-sync/upload@30b5446e3b5eb19595aa68a81ddf896a857302cf
env:
CROWDIN_PAT: ${{ secrets.CROWDIN_SYNC_CROWDIN_PAT }}
GITHUB_EVENT_BEFORE: ${{ steps.nighty-checks.outputs.lastNightly }}

steam-upload:
name: Upload Steam Builds 🚂
needs: [build-project]
Expand Down

0 comments on commit 56e3869

Please sign in to comment.