diff --git a/.github/workflows/transifex.yml b/.github/workflows/transifex.yml new file mode 100644 index 000000000..376bd73cd --- /dev/null +++ b/.github/workflows/transifex.yml @@ -0,0 +1,39 @@ +# This workflow will push the iD source strings to transifex +# - requires TX_TOKEN secret to be set on GitHub +# - you can generate a token at https://www.transifex.com/user/settings/api/ +# - job should fail silently if no token provided + +name: transifex + +on: + push: + branches: + - develop + +jobs: + transifex: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install transifex-client + - name: Create .transifexrc + uses: DamianReeves/write-file-action + with: + path: ${{env.home}}/.transifexrc + write-mode: overwrite + contents: | + [https://www.transifex.com] + api_hostname = https://api.transifex.com + hostname = https://www.transifex.com + password = ${{secrets.TX_TOKEN}} + username = api + - name: Push source strings to Transifex + run: tx push --source --no-interactive \ No newline at end of file