fetch translations from crowdin #7
Workflow file for this run
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: 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: 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}" |