-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (42 loc) · 1.43 KB
/
compile.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
name: compile-files
on:
push:
branches:
- main
jobs:
compile-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files_yaml: |
po:
- "**/LC_MESSAGES/*.po"
requirements:
- "pyproject.toml"
- "packaging/requirements-pyinstaller.in"
- name: Set up Python
if: steps.changed-files.outputs.po_any_changed == 'true' || steps.changed-files.outputs.requirements_any_changed == 'true'
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Compile catalogs
if: steps.changed-files.outputs.po_any_changed == 'true'
run: |
pip install babel setuptools
cd scripts
python batch_compile_catalog.py
- name: Compile requirements.txt
if: steps.changed-files.outputs.requirements_any_changed == 'true'
run: |
pip install uv
uv pip compile --universal --extra desktop --extra ujson --extra lxml --extra ruamel_yaml --no-annotate --no-header pyproject.toml packaging/requirements-pyinstaller.in -o packaging/requirements.txt
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: compile files