-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.31 KB
/
sync-with-translationio.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Synchronize translation strings with Translation.io"
on: workflow_dispatch
jobs:
synchronize:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ">=20.0.0"
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Synchronize translations
env:
TRANSLATION_IO_API_KEY: ${{ secrets.TRANSLATION_IO_API_KEY }}
run: npm run messages:sync
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build
run: npm run build
- name: Run build to ensure everything still works
run: npm run test
- name: Configure Git user
run: |
git config user.email "[email protected]"
git config user.name "$GITHUB_ACTOR"
- name: Commit and push
run: |
git commit -a -m "Synchronized translation with Translation.io"
git push