diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml new file mode 100644 index 000000000..17ee12b8e --- /dev/null +++ b/.github/workflows/crowdin.yml @@ -0,0 +1,39 @@ +name: Crowdin Action + +on: + push: + branches: [ master ] + paths: + - 'osu.Game.Rulesets.Karaoke/Localisation/**' + +jobs: + generate-localization-file: + name: Generate the localization file + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install dependencies + run: dotnet restore + - name: Install the localization tools. + run: dotnet tool restore + - name: Generate the localization file + run: dotnet localisation to-resx ./osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj --output ${{github.workspace}}\crowdin + + synchronize-with-crowdin: + name: Upload the localization into crowdin + runs-on: ubuntu-latest + needs: [generate-localization-file] + steps: + - name: crowdin action + uses: crowdin/github-action@1.4.9 + with: + upload_translations: true + download_translations: false + source: ${{github.workspace}}\crowdin\*.resx + translation: ${{github.workspace}}\crowdin\%file_name%.%locale%.%file_extension% + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}