forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.76 KB
/
post-release.yml
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
50
51
52
53
54
55
56
57
58
59
name: post-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/
# Only run this job on the main repository and not on forks
if: github.repository == 'aiidateam/aiida-core'
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.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install python dependencies
run: |
pip install -U -e .[docs,tests,rest,atomic_tools]
- name: Build pot files
env:
READTHEDOCS: 'True'
RUN_APIDOC: 'True'
run:
make -C docs gettext
- name: Install Transifex CLI
run: |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash -s -- v1.6.5
mv tx /usr/local/bin/tx
- name: Setting transifex configuration and upload pot files
env:
PROJECT_NAME: aiida-core
USER: ${{ secrets.TRANSIFEX_USER }}
PASSWD: ${{ secrets.TRANSIFEX_PASSWORD }}
run: |
sphinx-intl create-txconfig
sphinx-intl update-txconfig-resources --pot-dir docs/build/locale --transifex-project-name ${PROJECT_NAME}
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"${USER}"$'\npassword = '"${PASSWD}"$'\n' > ~/.transifexrc
- name: Push to transifex
run: |
tx push -t -s