-
Notifications
You must be signed in to change notification settings - Fork 279
38 lines (30 loc) · 1.04 KB
/
build-ota-updates.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
name: OTA translations
on:
push:
workflow_dispatch:
schedule:
# Every day at 10:11 UTC
- cron: '11 10 * * *'
jobs:
build-ota-translations:
name: Build OTA translations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fixup Crowdin config
run: 'echo "api_token_env: CROWDIN_PERSONAL_TOKEN" >>crowdin.yaml'
- name: Download latest translations from Crowdin
uses: crowdin/github-action@v1
with:
config: crowdin.yaml
token: ${{secrets.CROWDIN_PERSONAL_TOKEN}}
command: download
- name: Install GNU gettext
run: sudo apt-get install gettext
- name: Build OTA updates
run: scripts/build-ota-translations.sh
- name: Upload OTA updates
run: |
VERSION=$(sed -n -e 's/.*POEDIT_VERSION.* "\([0-9]*\)\.\([0-9]*\).*".*/\1.\2/p' src/version.h)
echo "OTA version: $VERSION"
curl --fail-with-body -F '[email protected]' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"