name: Upload translation sources

on:
  workflow_dispatch:

jobs:
  Sync:
    runs-on: ubuntu-latest

    steps:

    - name: Checkout
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
        submodules: 'true'

    - name: Upload translation sources to crowdin
      uses: crowdin/github-action@v1.6.0
      with:
        upload_sources: true
        upload_translations: false
        download_translations: false

        localization_branch_name: l10n_master
        create_pull_request: false 
        push_translations: false

        base_path: ${{ github.workspace }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
        CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
