diff options
| author | 2024-01-26 14:14:05 +0800 | |
|---|---|---|
| committer | 2024-01-26 14:14:05 +0800 | |
| commit | dee0ac81b67f8937f717c2d38468850f7071ce8d (patch) | |
| tree | fd003c237252e2c8e0602ae758d5c6063955c85c | |
| parent | 96e4c956d808cc8e3dbea497f6ea4ee36a742a08 (diff) | |
| download | infini-dee0ac81b67f8937f717c2d38468850f7071ce8d.tar.gz infini-dee0ac81b67f8937f717c2d38468850f7071ce8d.zip | |
refactor(ci|docs|files): update workflows, refresh docs cacahe and, delete useless files
| -rw-r--r-- | .github/workflows/pages.yml | 46 | ||||
| -rw-r--r-- | .github/workflows/python-publish.yml | 66 | ||||
| -rw-r--r-- | .markdownlint.jsonc | 13 | ||||
| -rw-r--r-- | CHANGELOG.md | 82 | ||||
| -rw-r--r-- | mkdocs.yml | 224 | ||||
| -rw-r--r-- | netlify.toml | 4 | ||||
| -rw-r--r-- | pyproject.toml | 2 |
7 files changed, 12 insertions, 425 deletions
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index 087819ba..00000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: build Pages -on: - push: - branches: - - master - - main - paths: - - "*.md" - - docs/** - - .github/workflows/pages.yml - -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: | - cp CHANGELOG.md docs/changelog.md - pip install -r docs/requirements.txt - pdm install - - - name: Build Documentation - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git fetch origin gh-pages:gh-pages - pdm run mike deploy --update-aliases dev - git push origin gh-pages - - - name: Save build cache - uses: actions/cache/save@v4 - with: - key: mkdocs-material-${{ hashfiles('.cache/**') }} - path: .cache diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b07d8efd..37b7526c 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,72 +1,28 @@ +name: Release + on: push: tags: - - "*" + - "v*" workflow_dispatch: jobs: - release-pypi: - name: release-pypi + build: runs-on: ubuntu-latest + environment: publish permissions: id-token: write - contents: write - steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v5 + - uses: pdm-project/setup-pdm@v3 + name: Setup PDM with: - python-version: "3.11" - - - name: Check prerelease - id: check_version - run: | - if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then - echo "PRERELEASE=false" >> $GITHUB_OUTPUT - else - echo "PRERELEASE=true" >> $GITHUB_OUTPUT - fi - - - name: Build Release Docs - run: | - cp CHANGELOG.md docs/changelog.md - pip install -r docs/requirements.txt - pdm install - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git fetch origin gh-pages:gh-pages - tag="${{ github.ref_name }}" - DOC_VERSION=${tag%.*} - pdm run mike deploy --update-aliases "$DOC_VERSION" latest - git push origin gh-pages + python-version: 3.9 + cache: true - name: Install dependencies run: pdm install - run: pdm publish - shell: bash - - # - name: Get Changelog - # id: get-changelog - # run: | - # awk '/-{3,}/{flag=1;next}/Release/{if (flag==1)exit}flag' CHANGELOG.md > .changelog.md - - # - name: Create Release - # uses: actions/create-release@main - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: ${{ github.ref }} - # release_name: v${{ github.ref }} - # body_path: .changelog.md - # draft: false - # prerelease: ${{ steps.check_version.outputs.PRERELEASE }} - - # - name: Trigger Bucket Update - # uses: benc-uk/workflow-dispatch@v1 - # with: - # workflow: Excavator - # repo: frostming/scoop-frostming - # token: ${{ secrets.G_T }} - # ref: master + shell: bash
\ No newline at end of file diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc deleted file mode 100644 index d8a288a2..00000000 --- a/.markdownlint.jsonc +++ /dev/null @@ -1,13 +0,0 @@ -{ - // MD013/line-length - Line length - "MD013": false, - - // MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content - "MD024": { - // Only check sibling headings - "siblings_only": true - }, - - // MD033/no-inline-html - Inline HTML - "MD033": false -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 65493321..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: 变更日志 ---- - -# Changelog - -## Infini - -### [1.0.5](https://github.com/HydroRoll-Team/infini/compare/v1.0.4...v1.0.5) `<small>`December 18,2023`</small>` - -**BREAKING CHANGES** - -* Handler: 使用 `Handler` 代替 `Rule` ([`573a6`](https://github.com/HydroRoll-Team/infini/compare/7b219aa12949...540a3ee9bb81))。 - -**FEATURES** - -* Handler: 实现泛型,实现 `self.stop()` `self.skip()` 方法 ([`573a6`](https://github.com/HydroRoll-Team/infini/compare/7b219aa12949...540a3ee9bb81))。 - -**BUG FIX** - -* templates: 根据最新的 `Handler` 更新模板中的子类写法 ([`477c9`](https://github.com/HydroRoll-Team/HydroRollCore/commit/477c9ccfe4451920838705ab4aba81b2b41d0c50))。 -* Event: 修订消息事件生成模式 ([`dd278`](https://github.com/HydroRoll-Team/infini/commit/dd27866fc9763af6f5b03024296dd74148d91eb3)),修复path不存在的问题 ([`5d4c7`](https://github.com/HydroRoll-Team/infini/commit/5d4c76a003a0f93ca52abe7f3997757ba66a97de))。 - -**CHORE** - -* Exceptions: 重定义三个异常基类 ([`68ab4a`](https://github.com/HydroRoll-Team/HydroRollCore/commit/68ab4a7d835e7ede363d3bc9fa2731a4a335f4a0))。 - -### [1.0.4](https://github.com/HydroRoll-Team/infini/compare/v1.0.3...v1.0.4) `<small>`October 7,2023`</small>` - -**FEATURES** - -* Docs: 美化 `style`。 -* Deps: 添加 `reportlab` 依赖,用于以后的 `pdf` 生成。 - -### [1.0.3](https://github.com/HydroRoll-Team/infini/compare/v1.0.2...v1.0.3) `<small>`October 7,2023`</small>` - -**NO CHARGES** - -### [1.0.2](https://github.com/HydroRoll-Team/infini/compare/v1.0.1...v1.0.2) `<small>`October 7,2023`</small>` - -**FEATURES** - -* Docs: 优化 `css` 细节。 - -### [1.0.1](https://github.com/HydroRoll-Team/infini/compare/v0.1.2...v1.0.1) `<small>`October 7,2023`</small>` - -**BUG FIX** - -* Docs: 修复 `Dev` 与 `latest` 分支的错别字。 - -### [0.1.2](https://github.com/HydroRoll-Team/infini/compare/v0.1.1...v0.1.2) `<small>`October 7,2023`</small>` - -> 同步版本所做的测试。 - -### [0.1.1](https://github.com/HydroRoll-Team/infini/compare/v0.1.0...v0.1.1) `<small>`October 7,2023`</small>` - -**BUG FIX** - -* CLI: 添加命令行参数解析。 - -### [0.1.0-rc1](https://github.com/HydroRoll-Team/infini/compare/v0.1.0...v0.1.0-rc1) `<small>`October 7,2023`</small>` - -**CHORE** - -* README: 更新主页介绍的安装指南。 - -### [0.1.0](https://github.com/HydroRoll-Team/infini/commits/v0.0.1..v0.1.0) `<small>`October 7,2023 `</small>` - -**FEATURES** - -* CLI: 添加两个命令行名称 `infini` 与 `HRC`。 - -### [0.0.1](https://github.com/HydroRoll-Team/infini/commits/v0.0.1) `<small>`July 4,2023`</small>` - -**FEATURES** - -* __init__: 添加命令行参数解析。 -* Rule: 添加 Rule 基类,实现读取指定文件夹下的 python 脚本或 python 包 - -**BREAKING CHANGE** - -* infini: 添加命令行Path。 diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index e7b7ba6f..00000000 --- a/mkdocs.yml +++ /dev/null @@ -1,224 +0,0 @@ -site_name: Infini 核心文档 -repo_url: https://github.com/HydroRoll-Team/infini -repo_name: HydroRoll-Team/infini -edit_uri: edit/master/docs/ -site_author: HsiangNianian -site_description: >- - 一个基于通用规则包标准的规则包加载器 - -theme: - name: material - language: zh - favicon: images/logo.png - icon: - logo: material/book-sync - repo: fontawesome/brands/git-alt - annotation: material/arrow-right-circle - custom_dir: docs/src/overrides - palette: - - scheme: default - primary: indigo - accent: indigo - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - scheme: slate - primary: black - accent: indigo - toggle: - icon: material/brightness-4 - name: Switch to light mode - features: - - announce.dismiss - - content.action.edit - - content.action.view - - content.tooltips - - content.tabs.link - - content.code.annotate - - content.code.copy - - content.code.select - - navigation.footer - - navigation.tabs - # - navigation.tabs.sticky - - navigation.sections - # - navigation.expand - - navigation.path - - navigation.indexes - - toc.follow - - navigation.top - - search.highlight - - search.suggest - - search.share - - header.autohide - - navigation.footer - - navigation.instant - - navigation.instant.prefetch - - navigation.instant.progress - - font: - text: Times New - code: Times New -extra: - status: - new: 最近添加 - deprecated: 已被废弃 - version: - provider: mike - homepage: https://grps.hydroroll.team # hydroroll-team.github.io - consent: - title: Cookie 偏好设置 - description: >- - 我们使用Cookie来识别您的重复访问和偏好,以及衡量我们的文档的有效性和用户是否找到他们搜索的内容。在您的同意下,这将帮助我们改善我们的文档。 - actions: - - accept - - manage - cookies: - analytics: - name: Google Analytics - checked: true - github: - name: GitHub - checked: true - - social: - - icon: fontawesome/brands/github - link: https://github.com/HydroRoll-Team - - icon: fontawesome/brands/python - link: https://pypi.org/project/infini/ - -copyright: > - Copyright © 2023 - PRESENT. <a href="#__consent">(管理Cookies)</a> - -markdown_extensions: - - attr_list - - md_in_html - - pymdownx.superfences - - pymdownx.snippets: - auto_append: - - RulePackage/getStart/getDeeper/Module.md - - abbr - - admonition - - def_list - - footnotes - - toc: - permalink: ⚓ - - pymdownx.arithmatex: - generic: true - - pymdownx.betterem: - smart_enable: all - - pymdownx.caret - - pymdownx.details - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - linenums: true - - pymdownx.inlinehilite - - pymdownx.keys - - pymdownx.magiclink: - normalize_issue_symbols: true - repo_url_shorthand: true - user: HydroRoll-Team - repo: infini - - pymdownx.mark - - pymdownx.smartsymbols - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - - pymdownx.tabbed: - alternate_style: true - combine_header_slug: true - slugify: !!python/object/apply:pymdownx.slugs.slugify - kwds: - case: lower - - pymdownx.tasklist: - custom_checkbox: true - - pymdownx.tilde - -plugins: - - blog - - search: - separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' - - git-authors - - mike: - version_selector: true - - mkdocstrings: - handlers: - python: - options: - docstring_style: google - - git-revision-date-localized: - enable_creation_date: true - fallback_to_build_date: true - timezone: Asia/Shanghai - type: timeago - custom_format: "%d. %B %Y" - - git-committers: - repository: HydroRoll-Team/infini - - minify: - minify_html: true -nav: - - 主页: index.md - - 水系核心: - - "核心概览": Core/index.md - - 规则包入门: - - 概述: RulePackage/intro.md - - 开始: - - "类": RulePackage/getStart/class.md - - "方法": RulePackage/getStart/method.md - - "属性": RulePackage/getStart/attribute.md - - 深入: - - "对象": RulePackage/getStart/getDeeper/object.md - - "模块": RulePackage/getStart/getDeeper/Module.md - - "包": RulePackage/getStart/getDeeper/Package.md - - 实战: - - "了解Python": RulePackage/Write/python.md - - "准备规则书": RulePackage/Write/prepare.md - - "编写规则包": RulePackage/Write/write.md - - 技巧: - - RulePackage/skill/index.md - - "善用语法糖": RulePackage/skill/fstring.md - - 通用规则包标准: - - 什么是规则包?: Standard/what-is-rule-package.md - - 为什么要做规则包?: Standard/why-rule-package.md - - 什么是通用规则包标准?: Standard/what-is-standard.md - - 术语表(草案): - - setting 背景: Standard/Term/setting.md - - scenario 剧本: Standard/Term/scenario.md - - duration 时长: - - Standard/Term/duration/index.md - - sene 场: Standard/Term/duration/sene.md - - module 模组: Standard/Term/duration/module.md - - campaign 战役: Standard/Term/duration/campaign.md - - DefaultDice 默认骰子: - - Standard/Term/DefaultDice/index.md - - _sides 骰子面数: Standard/Term/DefaultDice/_sides.md - - _counts 骰子个数: Standard/Term/DefaultDice/_counts.md - - check 检定: - - Standard/Term/check/index.md - - ability 检定: Standard/Term/check/ability.md - - PlayerCard 人物卡: - - Standard/Term/PlayerCard/index.md - - CLI 参考: - - "CLI Reference": CLI/index.md - - API 参考: - - "API Reference": API/index.md - - 其他帮助: - - "术语表一览": Help/TermList.md - - "Python 技巧": Help/PythonSkill.md - - "图标、图例、注释说明": Help/emoji.md - - 博客: - - blog/index.md - - 日志: - - changelog.md - -extra_css: - - stylesheets/extra.css - -extra_javascript: - - "https://samuelcolvin.github.io/mkdocs-run-code/run_code_main.js" diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 37b79714..00000000 --- a/netlify.toml +++ /dev/null @@ -1,4 +0,0 @@ -# netlify.toml -[build] - command = "mkdocs build" - publish = "site" diff --git a/pyproject.toml b/pyproject.toml index f4309312..74732d12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "infini" version = "2.0.0-alpha.1" description = "Infini 核心标准文本输入输出模块" authors = [ - { name = "简律纯", email = "i@jyunko.cn" }, + { name = "简律纯", email = "leader@hydroroll.team" }, { name = "苏向夜", email = "fu050409@163.com" }, ] dependencies = [ |
