From a539808761da866d79209804bf5cdedc206f44ed Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Thu, 30 May 2024 09:37:22 +0800 Subject: [PATCH] ci: create crowdin action (#2437) --- .github/crowdin/crowdin-push.yml | 9 +++++++++ .github/workflows/crowdin.yml | 30 ++++++++++++++++++++++++++++++ src/core/render/emoji-data.js | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/crowdin/crowdin-push.yml create mode 100644 .github/workflows/crowdin.yml diff --git a/.github/crowdin/crowdin-push.yml b/.github/crowdin/crowdin-push.yml new file mode 100644 index 0000000..ebc81d1 --- /dev/null +++ b/.github/crowdin/crowdin-push.yml @@ -0,0 +1,9 @@ +files: + - source: /*.md + translation: /%two_letters_code%/%original_file_name% + ignore: + - '/_coverpage.md' + - '/_navbar.md' + +project_id_env: CROWDIN_PROJECT_ID +api_token_env: CROWDIN_PERSONAL_TOKEN diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml new file mode 100644 index 0000000..f5281d3 --- /dev/null +++ b/.github/workflows/crowdin.yml @@ -0,0 +1,30 @@ +name: Crowdin Action + +on: + workflow_dispatch: + push: + paths: + - 'docs/**.md' + branches: [develop, master] + +jobs: + crowdin: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Crowdin push + uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: false + download_translations: false + push_translations: false + config: '.github/crowdin/crowdin-push.yml' + crowdin_branch_name: ${{ github.ref_name }} + base_path: ${{ github.workspace }}/docs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/src/core/render/emoji-data.js b/src/core/render/emoji-data.js index 6f42042..9a4fd9e 100644 --- a/src/core/render/emoji-data.js +++ b/src/core/render/emoji-data.js @@ -1,4 +1,4 @@ - +/* eslint-disable */ // ============================================================================= // DO NOT EDIT: This file is auto-generated by an /build/emoji.js