-
-
Notifications
You must be signed in to change notification settings - Fork 37
91 lines (87 loc) · 2.33 KB
/
translations.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Translations
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
update:
strategy:
fail-fast: true
matrix:
version:
- "2016"
- "2017"
- "2018"
- "2019"
- "2020"
- "2021"
- "2022"
- "2023"
- "2024"
- "2025"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.version }}
fetch-depth: 0
submodules: recursive
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
cache: true
- name: Install dependencies
run: |
pdm install --group dev,docs
- name: Update submodules
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Update translations
run: sh docs/update-locale.sh
env:
version: ${{ matrix.version }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: abqpy-locale-${{ matrix.version }}
path: docs/source/locale/${{ matrix.version }}
push:
needs: update
strategy:
fail-fast: true
max-parallel: 1
matrix:
version:
- "2016"
- "2017"
- "2018"
- "2019"
- "2020"
- "2021"
- "2022"
- "2023"
- "2024"
- "2025"
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: abqpy-locale-${{ matrix.version }}
path: locale
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
with:
source-directory: locale
destination-github-username: "haiiliin"
destination-repository-name: "abqpy-locale"
target-directory: ${{ matrix.version }}
user-name: github-actions[bot]
user-email: github-actions[bot]@users.noreply.github.com
commit-message: See ORIGIN_COMMIT from $GITHUB_REF
target-branch: main