Run powrap in ci.yml #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
env: | |
LANGUAGE: pt_BR | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: true | |
submodules: true | |
- name: Update submodule | |
run: | | |
git submodule update | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: | | |
**/setup.cfg | |
**/requirements*.txt | |
- name: Install gettext | |
run: | | |
sudo apt update -y && sudo apt install gettext -y | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -r requirements.txt -r peps/requirements.txt | |
- name: Patch build.py to add --gettext flag | |
run: | | |
git apply ../add-gettext-builder.diff | |
working-directory: peps | |
- name: Generate POT files | |
run: | | |
python build.py --gettext | |
working-directory: peps | |
- name: Add/Update message catalog files | |
run: | | |
sphinx-intl update -d ../locales -p build/ -l ${{ env.LANGUAGE }} | |
working-directory: peps | |
- name: powrap | |
run: | | |
powrap locales/**/*.po | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Translation update" | |
file_pattern: .gitmodules locales/**/*.po | |
add_options: '-A' |