mirror of
https://codeberg.org/gitnex/GitNex
synced 2025-01-21 15:15:40 +01:00
Push translations via CI (#1041)
Automatically push translation files to Crowdin when pushing changes to the strings.xml file (only English). Addresses #141 @mmarif You have to add a new secret to gitlab ci, `CROWDIN_TOKEN`, that contains the crowdin api token. Co-authored-by: qwerty287 <ndev@web.de> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1041 Reviewed-by: 6543 <6543@noreply.codeberg.org> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org> Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org> Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
parent
56ff09d44d
commit
245998e36b
@ -71,6 +71,20 @@ release:
|
|||||||
- "[[ $CI_COMMIT_REF_NAME == *'-rc'* ]] && echo 'Upload blocked. Build seems to be a release candidate.' && exit 0"
|
- "[[ $CI_COMMIT_REF_NAME == *'-rc'* ]] && echo 'Upload blocked. Build seems to be a release candidate.' && exit 0"
|
||||||
- curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/releases/'"$CI_COMMIT_REF_NAME"'.apk'
|
- curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/releases/'"$CI_COMMIT_REF_NAME"'.apk'
|
||||||
|
|
||||||
|
push_translations:
|
||||||
|
image: crowdin/cli:3.7.8
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- main
|
||||||
|
changes:
|
||||||
|
- app/src/main/res/values/strings.xml
|
||||||
|
script:
|
||||||
|
- echo "Set up Crowdin CLI"
|
||||||
|
- cp crowdin.example.yml crowdin.yml
|
||||||
|
- sed -i 's/-removed-/$CROWDIN_TOKEN/' filename
|
||||||
|
- echo "Push translations"
|
||||||
|
- crowdin push
|
||||||
|
|
||||||
on_success:
|
on_success:
|
||||||
image: curlimages/curl:7.77.0
|
image: curlimages/curl:7.77.0
|
||||||
stage: .post
|
stage: .post
|
||||||
|
Loading…
Reference in New Issue
Block a user