-
Notifications
You must be signed in to change notification settings - Fork 15
91 lines (73 loc) · 2.41 KB
/
release_all_external.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: Release all INTERNAL & EXTERNAL dictionaries
on:
workflow_dispatch:
push:
paths-ignore:
- .gitignore
- '*.md'
- LICENSE
- bin/create_inflections.py
- .github/workflows/release_all.yml
env:
INPUT_DIR: ext-dict
OUTPUT_DIR: ext-output
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: 'recursive'
- name: Setup Ubuntu packages
run: |
# Call a script so that it can be used in a shell/container as well
./bin/install_linux_packages.sh
- name: Setup Wine32
run: |
# Call a script so that it can be used in a shell/container as well
./bin/install_wine32.sh
- name: Setup Utilities
run: |
# Call a script so that it can be used in a shell/container as well
./bin/install_utilities.sh
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Setup Python packages
run: |
pip install uv &&
uv sync
# pip install -r ./requirements.txt
- name: Copy internal dictionaries
run: |
cp dict/*.* $INPUT_DIR/ &&
ls $INPUT_DIR &&
mkdir $OUTPUT_DIR &&
ls -l | wc -l
- name: Build all dictionaries
run: |
source .venv/bin/activate &&
uv pip list &&
uv run python ./bin/convert_all.py --input_folder=$INPUT_DIR --output_folder=$OUTPUT_DIR --extension=tab
- name: Report the results
run: |
ls -R -l $OUTPUT_DIR &&
uv run python ./bin/dict_summary.py --dict_dir=$INPUT_DIR --output_dir=$OUTPUT_DIR --read_only=no
- name: Get Current Timestamp
id: timestamp
run: |
echo "TIMESTAMP=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Create a new release draft
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.OUTPUT_DIR }}/*.*,${{ env.INPUT_DIR }}/dict_summary.json"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
draft: true
name: "Release ALL dictionaries at ${{ github.ref }} - ${{ env.TIMESTAMP }}"
bodyFile: ${{ env.INPUT_DIR }}/dict_summary.md