-
Notifications
You must be signed in to change notification settings - Fork 34
46 lines (38 loc) · 1.24 KB
/
sync.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
name: Commit to Cemu repo
on:
workflow_dispatch:
jobs:
convert:
runs-on: ubuntu-latest
steps:
- name: Checkout Cemu-Language repo
uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/Cemu-Language
path: Cemu-Language
- name: Install gettext
run: sudo apt-get install -y gettext
- name: Convert .po to .mo
run: |
for po_file in $(find Cemu-Language -name "*.po"); do
mo_file="${po_file%.po}.mo"
msgfmt $po_file -o $mo_file
done
- name: Checkout Cemu repo
uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/Cemu
path: Cemu
token: ${{ secrets.CI_CEMU_PUSH_TOKEN }}
- name: Copy .mo files
run: |
mkdir -p Cemu/bin/resources
cp -r Cemu-Language/resources/* Cemu/bin/resources/
- name: Commit and push .mo files
run: |
cd Cemu
git config user.name "Cemu-Language CI"
git config user.email "[email protected]"
git add bin/resources/**/*.mo
git commit -m "Update translation files" || exit 0 # Don't fail if no changes
git push