This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92683a2
commit 9208fec
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,28 +32,29 @@ jobs: | |
- run: npm i -g @crowdin/[email protected] | ||
- name: Fetch,Sync & Push Strings to Crowdin | ||
run: | | ||
branch_name="new_translation_strings" | ||
echo "Setting up Git identity" | ||
git config --global user.name "DerivFE" | ||
git config --global user.email "[email protected]" | ||
echo "Checking out new branch [$branch_name]" | ||
git checkout -b "$branch_name" | ||
# Download new translated strings | ||
echo 'Fetch Crowdin Master Translation ⬇️' | ||
crowdin download -b master -T ${{ secrets.CROWDIN_API_KEY }} && crowdin download -b master -l zh-CN -T ${{ secrets.CROWDIN_API_KEY }} | ||
if [ -n "$(git status --porcelain)" ]; then | ||
# New strings are added, create a PR to update the master | ||
branch_name="new_translation_strings" | ||
echo "Setting up Git identity" | ||
git config --global user.name "DerivFE" | ||
git config --global user.email "[email protected]" | ||
# Commit the newly downloaded files | ||
cd $(git rev-parse --show-toplevel) | ||
echo "GIT STATUS: $(git status --porcelain)" | ||
git add . | ||
echo "Checking out new branch [$branch_name]" | ||
git checkout -b "$branch_name" | ||
# Force push to this branch in case a previous run created it. | ||
git push --set-upstream origin "$branch_name" -f | ||
|