mirror of
https://github.com/moyf/easy-copy.git
synced 2026-07-22 05:43:47 +00:00
docs: restructure CHANGELOG with details blocks and update release workflow for minor-series aggregation
This commit is contained in:
parent
d693e59061
commit
f59fd09cd2
2 changed files with 51 additions and 22 deletions
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
|
|
@ -26,10 +26,33 @@ jobs:
|
|||
id: changelog
|
||||
run: |
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
# Extract content between this version's heading and the next version's heading
|
||||
notes=$(awk "/^## \[${tag}\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
|
||||
# Write to file to handle multiline content safely
|
||||
echo "$notes" > release_notes.md
|
||||
# Derive the minor version prefix (e.g. "1.6" from "1.6.1")
|
||||
minor=$(echo "$tag" | sed 's/\.[0-9]*$//')
|
||||
|
||||
# Collect all patch versions of this minor series present in CHANGELOG,
|
||||
# in the order they appear (newest first).
|
||||
# Each version block runs from its "## [X.Y.Z]" heading to the next "## [" heading.
|
||||
python3 - "$minor" <<'PYEOF' > release_notes.md
|
||||
import sys, re
|
||||
|
||||
minor = sys.argv[1]
|
||||
|
||||
with open("CHANGELOG.md", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
# Split into version blocks on "## [x.y.z]" headings
|
||||
pattern = re.compile(r'^(## \[\d+\.\d+\.\d+\].*?)(?=^## \[|\Z)', re.MULTILINE | re.DOTALL)
|
||||
blocks = pattern.findall(content)
|
||||
|
||||
output = []
|
||||
for block in blocks:
|
||||
# Check if this block belongs to our minor version
|
||||
heading_match = re.match(r'^## \[(\d+\.\d+)\.\d+\]', block)
|
||||
if heading_match and heading_match.group(1) == minor:
|
||||
output.append(block.strip())
|
||||
|
||||
print("\n\n---\n\n".join(output))
|
||||
PYEOF
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
|
|
|
|||
42
CHANGELOG.md
42
CHANGELOG.md
|
|
@ -18,9 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **Generate block link** — falls through to the existing block ID generation behavior (same as before this feature)
|
||||
- **Disabled** — skips code block detection entirely
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
|
|
@ -31,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **生成块链接** —— 沿用原有的块ID生成逻辑(与此功能上线前行为一致)
|
||||
- **禁用** —— 跳过代码块检测,不做任何特殊处理
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## [1.6.0] - 2026-05-09
|
||||
|
|
@ -51,9 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Extracted `copyMetadata.ts` and `pasteResolution.ts` as pure-function modules with full test coverage
|
||||
- Added 98 new tests (total: 184)
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
|
|
@ -71,6 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- 提取 `copyMetadata.ts` 和 `pasteResolution.ts` 为纯函数模块,完整测试覆盖
|
||||
- 新增 98 个测试(总计 184 个)
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## [1.5.3] - 2026-04-22
|
||||
|
|
@ -88,9 +90,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Extracted link-building logic into pure functions; added vitest with 86 tests
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
|
|
@ -105,6 +106,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- 将链接构建逻辑提取为纯函数,新增 vitest 测试框架,86 个测试用例
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## [1.5.2] - 2026-04-02
|
||||
|
|
@ -118,9 +121,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Inline code, bold, highlight, italic, strikethrough, inline LaTeX detection improvements
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
|
|
@ -131,6 +133,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- 行内代码、加粗、高亮、斜体、删除线、行内LaTeX 检测改进
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## [1.5.1] - 2025-12-11
|
||||
|
|
@ -140,15 +144,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **Frontmatter display text**: Use a note property (e.g. `title`) as the display text for note links
|
||||
- **Auto block display text**: Automatically generate display text for block ID links, with configurable word/character limits
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
- **Frontmatter 显示文本**:使用笔记属性(如 `title`)作为笔记链接的显示文本
|
||||
- **块链接自动显示文本**:自动为块ID链接生成显示文本,可配置单词数/字符数限制
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## [1.5.0] - 2025-11-05
|
||||
|
|
@ -160,9 +165,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **Block ID insert position**: Choose between end-of-block or next-line insertion
|
||||
- **Extra commands**: "Copy current file link" and "Generate & copy current block link" commands added to command palette
|
||||
|
||||
---
|
||||
|
||||
## 改动内容
|
||||
<details>
|
||||
<summary>改动内容(点击展开中文说明)</summary>
|
||||
|
||||
### ✨ 新增
|
||||
|
||||
|
|
@ -171,6 +175,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **块ID插入位置**:可选择在块末尾或下一行插入
|
||||
- **拓展命令**:命令面板新增「复制当前文件链接」和「生成并复制当前块链接」命令
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
[1.6.1]: https://github.com/Moyf/easy-copy/compare/1.6.0...1.6.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue