File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : OTA translations
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ # Every day at 10:11 UTC
7
+ - cron : ' 11 10 * * *'
8
+
9
+ jobs :
10
+ build-ota-translations :
11
+ name : Build OTA translations
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Install GNU gettext
18
+ run : sudo apt-get install gettext
19
+
20
+ - name : Install Crowdin CLI
21
+ run : npm i -g @crowdin/cli
22
+
23
+ - name : Download latest translations from Crowdin
24
+ run : |
25
+ echo 'api_token: "${{secrets.CROWDIN_PERSONAL_TOKEN}}"' >>crowdin.yaml
26
+ crowdin download
27
+ rm crowdin.yaml
28
+
29
+ - name : Build OTA updates
30
+ run : scripts/build-ota-translations.sh
31
+
32
+ - name : Upload OTA updates
33
+ run : |
34
+ VERSION=$(sed -n -e 's/.*POEDIT_VERSION.* "\([0-9]*\)\.\([0-9]*\).*".*/\1.\2/p' src/version.h)
35
+ echo "OTA version: $VERSION"
36
+ curl --fail-with-body -F 'data=@ota-update.tar' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"
You can’t perform that action at this time.
0 commit comments