-
-
Notifications
You must be signed in to change notification settings - Fork 24
76 lines (63 loc) · 2.33 KB
/
auto-updates.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
name: Update dictionaries
on:
schedule:
# At 01:00 (UTC) every day
- cron: "0 1 * * *"
# Allow to call the workflow manually
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
# List of locales to generate
strategy:
fail-fast: false
matrix:
locale: # XXX_LOCALES
- "ca"
- "da"
- "de"
- "el"
- "en"
- "eo"
- "es"
- "fr"
- "it"
- "no"
- "pt"
- "ro"
- "ru"
- "sv"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Download the latest Wiktionary dump
run: python -Wd -m wikidict ${{ matrix.locale }} --download
- name: Parse the dump
run: python -Wd -m wikidict ${{ matrix.locale }} --parse
- name: 📍 Render templates
run: python -Wd -m wikidict ${{ matrix.locale }} --render
- name: Convert to dictionaries
run: python -Wd -m wikidict ${{ matrix.locale }} --convert
- name: Generate the release description
run: python -Wd -m wikidict ${{ matrix.locale }} --release > release.txt
- name: Upload release data
if: github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ matrix.locale }}
body_path: release.txt
files: |
data/${{ matrix.locale }}/dicthtml-${{ matrix.locale }}-${{ matrix.locale }}*.zip
data/${{ matrix.locale }}/dicthtml-${{ matrix.locale }}-${{ matrix.locale }}*.zip.sha256
data/${{ matrix.locale }}/dict-${{ matrix.locale }}-${{ matrix.locale }}*.df.bz2
data/${{ matrix.locale }}/dict-${{ matrix.locale }}-${{ matrix.locale }}*.df.bz2.sha256
data/${{ matrix.locale }}/dict-${{ matrix.locale }}-${{ matrix.locale }}*.zip
data/${{ matrix.locale }}/dict-${{ matrix.locale }}-${{ matrix.locale }}*.zip.sha256
data/${{ matrix.locale }}/dictorg-${{ matrix.locale }}-${{ matrix.locale }}*.zip
data/${{ matrix.locale }}/dictorg-${{ matrix.locale }}-${{ matrix.locale }}*.zip.sha256