mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-01 08:39:31 +01:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: Crowdin translation download
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 */7 * *'
|
|
|
|
jobs:
|
|
synchronize-with-crowdin:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
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
|
|
download_translations: true
|
|
download_translations_args: "--verbose"
|
|
|
|
localization_branch_name: i18n
|
|
create_pull_request: true
|
|
commit_message: "New Crowdin translations"
|
|
pull_request_title: "New Crowdin translations"
|
|
pull_request_base_branch_name: "main"
|
|
|
|
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
|
|
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
source: "i18n/build/source.yaml"
|
|
translation: "/i18n/src/main/resources/translations/%three_letters_code%.%file_extension%"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|