Updates sourcesource #254
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: 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: | |
if: "!contains(github.event.head_commit.message, 'AUTO')" | |
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 venv .venv && | |
uv sync | |
# pip install -r ./requirements.txt | |
- name: Copy internal dictionaries | |
run: | | |
cp dict/*.* $INPUT_DIR/ && | |
ls $INPUT_DIR | |
- name: Build all dictionaries | |
run: | | |
source .venv/bin/activate && | |
uv pip list && | |
python ./bin/convert_all.py --input_folder=$INPUT_DIR --output_folder=$OUTPUT_DIR --extension=tab --filter=Hero | |
- name: Report the results | |
run: | | |
ls -R -l $OUTPUT_DIR && | |
python ./bin/dict_summary.py --dict_dir=$INPUT_DIR | |
- 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 |