Skip to content

Commit

Permalink
add github action of transifex upload
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Apr 23, 2020
1 parent d6e8c7d commit ab527f1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .ci/transifex_upload.sh

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release

# on:
# release:
# types: [published, edited]
on: [push, pull_request]

jobs:

upload-transifex:
# Every time when a new version is released,
# upload the latest pot files to transifex services for team transilation.
# https://www.transifex.com/aiidateam/aiida-core/dashboard/

name: Upload pot files to transifex
runs-on: ubuntu-latest
timeout-minutes: 30

# Build doc to pot files and register them to `.tx/config` file
# Installation steps are modeled after the docs job in `ci.yml`
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install python dependencies
run: |
pip install numpy==1.17.4
pip install transifex-client sphinx-intl
pip install -e .[docs,testing]
- name: Build pot files
env:
READTHEDOCS: 'True'
RUN_APIDOC: 'False'
run:
sphinx-build -b gettext docs/source locale

- name: Setting transifex configuration and upload pot files
env:
PROJECT_NAME: 'aiida-core'
USER: ${{ secrets.TRANSIFEX_USER }}
PASSWD: ${{ secrets.TRANSIFEX_PASSWORD }}
run: |
tx init --no-interactive
sphinx-intl update-txconfig-resources --pot-dir locale --transifex-project-name ${PROJECT_NAME}
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"${USER}"$'\npassword = '"${PASSWD}"$'\n' > ~/.transifexrc
tx push -s

0 comments on commit ab527f1

Please sign in to comment.