Use GitHub Actions for crowdin sync #24
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
name: Translate | |
on: [push] | |
jobs: | |
update: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Generate template | |
run: | | |
git clone --depth 1 https://github.com/x64dbg/x64dbg | |
cd x64dbg | |
mkdir bin\translations | |
git ls-files *.java *.jui *.ui *.c *.c++ *.cc *.cpp *.cxx *.ch *.h *.h++ *.hh *.hpp *.hxx *.js *.qs *.qml *.qrc > bin\translations\files.lst | |
..\lupdate.exe @bin\translations\files.lst -locations absolute -ts x64dbg.ts | |
Copy-Item ".\x64dbg.ts" -Destination "..\x64dbg.ts" -Force | |
- name: Crowdin sync | |
env: | |
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} | |
run: | | |
.\crowdin-sync.bat | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.UPDATE_SSH_KEY }} | |
ref: translations | |
path: translations_repo | |
- name: Push translations | |
shell: bash | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: ./update-translations.sh |