Repository navigation
49 lines (40 loc) · 1.45 KB
/
Copy pathrelease.yml
File metadata and controls
49 lines (40 loc) · 1.45 KB
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
39
40
41
42
43
44
45
46
47
48
49
name: release
on:
release:
types: [published, edited]
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@v2
with:
python-version: 3.7
- name: Install python dependencies
run: |
pip install transifex-client sphinx-intl
pip install -e .[docs,tests]
- 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