Ascension/.github/workflows/crowdin-download.yaml

46 lines
1.4 KiB
YAML
Raw Normal View History

2021-07-29 03:14:29 +02:00
name: Crowdin translation download
on:
2023-07-19 17:41:02 +02:00
workflow_dispatch:
schedule:
2023-07-21 16:17:00 +02:00
- cron: '0 0 */7 * *'
2021-07-29 03:14:29 +02:00
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
2022-04-20 09:22:05 +02:00
uses: actions/checkout@v3
2023-07-19 20:36:25 +02:00
- name: Setup Java
uses: actions/setup-java@v3
2021-07-29 03:14:29 +02:00
with:
2023-07-19 20:36:25 +02:00
distribution: "adopt"
java-version: "17"
- name: Make gradlew executable
run: "sudo chmod +x gradlew"
- name: Build i18n application
run: "./gradlew i18n:build"
- name: Generate translation source
run: "java -jar i18n/build/libs/i18n-all.jar"
- name: Download translations from Crowdin
uses: crowdin/github-action@v1
with:
upload_sources: false
upload_translations: false
download_sources: false
2021-07-29 03:14:29 +02:00
download_translations: true
2023-07-19 19:51:34 +02:00
download_translations_args: "--verbose"
2021-07-29 03:14:29 +02:00
localization_branch_name: i18n
create_pull_request: true
2023-07-19 19:51:34 +02:00
commit_message: "New Crowdin translations"
2021-07-29 03:14:29 +02:00
pull_request_title: "New Crowdin translations"
2023-07-19 19:51:34 +02:00
pull_request_base_branch_name: "main"
2021-07-29 03:14:29 +02:00
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
2023-07-19 20:36:25 +02:00
source: "i18n/build/source.yaml"
2023-08-26 14:55:51 +02:00
translation: "/i18n/src/main/resources/translations/%two_letters_code%.%file_extension%"
2021-07-29 03:14:29 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}