name: ASF-crowdin-ci

on:
  push:
    branches:
    - main

permissions: {}

jobs:
  upload:
    environment: dev-crowdin
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      with:
        show-progress: false
        submodules: recursive

    - name: Upload latest strings for translation on Crowdin
      uses: crowdin/github-action@b4b468cffefb50bdd99dd83e5d2eaeb63c880380 # v2.14.0
      with:
        crowdin_branch_name: main
        config: '.github/crowdin.yml'
        project_id: ${{ secrets.ASF_CROWDIN_PROJECT_ID }}
        token: ${{ secrets.ASF_CROWDIN_API_TOKEN }}
