Skip to content

Commit

Permalink
build: download translations when pushing to staging (Uniswap#6780)
Browse files Browse the repository at this point in the history
* build: pin crowdin action

* build: download t9n to staging
  • Loading branch information
zzmp authored Jun 16, 2023
1 parent f3889e3 commit 4894460
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/1-main-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,40 @@ jobs:
with:
token: ${{ secrets.RELEASE_SERVICE_ACCESS_TOKEN }}
ref: main

# The source file must exist for the corresponding translation messages to be downloaded.
- run: touch src/locales/en-US.po
- name: Download translations
uses: crowdin/github-action@3133cc916c35590475cf6705f482fb653d8e36e9
with:
upload_sources: false
download_translations: true
project_id: 458284
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
source: 'src/locales/en-US.po'
translation: 'src/locales/%locale%.po'
localization_branch_name: main
create_pull_request: false
push_translations: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Git config
run: |
git config user.name "UL Service Account"
git config user.email "[email protected]"
- name: Add CODEOWNERS file
git config user.name 'UL Service Account'
git config user.email '[email protected]'
- name: Add translations
run: |
echo "@uniswap/web-admins" > CODEOWNERS
git add src/locales/*.po
git commit -m 'ci(t9n): download translations from crowdin'
- name: Add CODEOWNERS
run: |
echo '@uniswap/web-admins' > CODEOWNERS
git add CODEOWNERS
git commit -m "ci: add global CODEOWNERS"
git commit -m 'ci: add global CODEOWNERS'
- name: Git push
run: |
git push origin main:releases/staging --force
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- run: yarn i18n:extract

- name: Download Crowdin translations
uses: crowdin/github-action@1.4.9
uses: crowdin/github-action@3133cc916c35590475cf6705f482fb653d8e36e9
with:
upload_sources: false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- run: yarn i18n:extract

- name: Upload Crowdin sources
uses: crowdin/github-action@1.1.0
uses: crowdin/github-action@3133cc916c35590475cf6705f482fb653d8e36e9
with:
upload_sources: true
download_translations: false
Expand Down

0 comments on commit 4894460

Please sign in to comment.