Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github action of transifex upload #3958

Merged
merged 2 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .ci/transifex_upload.sh

This file was deleted.

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

on:
release:
types: [published, edited]

jobs:

upload-transifex:
csadorf marked this conversation as resolved.
Show resolved Hide resolved
# 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:
csadorf marked this conversation as resolved.
Show resolved Hide resolved
- 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
csadorf marked this conversation as resolved.
Show resolved Hide resolved
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