Skip to content

generate-dictionaries #113

generate-dictionaries

generate-dictionaries #113

Workflow file for this run

# 此 Github Action 自动运行 Python 脚本、生成词典并发布 release。
name: generate-dictionaries
# 触发条件:每月 1 日、15 日 UTC 时间 0 时,即北京时间 8 时
on:
schedule:
- cron: '0 0 1,15 * *'
# 测试用触发条件
#on:
# workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
# 配置 Python 环境,安装 python 库,检出子模块
- uses: actions/checkout@v4.0.0
- name: setup-python
uses: actions/setup-python@v4.7.0
with:
python-version: '3.11'
- name: install-pip-packages
uses: BSFishy/pip-action@v1
with:
packages: |
requests
tqdm
- name: checkout-submodules
shell: bash
run: git submodule update --init --recursive
# 运行 Python 代码
- name: run-python-codes
shell: bash
run: python3 ./main.py
# 获取日期并发布 GitHub Release
- name: create-release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: latest
title: "最新构建"
files: |
output/*