Skip to content

Commit 99f0d7d

Browse files
ppminamin
andauthored
fix ci (#9)
* chore: test uv and ruff * feat: new feature( universe define and download data) * fix: fix some olg bugs * fix: fix pytest * docs: 修复MkDocs文档链接和结构问题 * docs: 完善API和示例文档,添加完整changelog * fix: fix date to ts in storagedb * fix: enhance universe definition and market data service - Updated universe definition to include a delay of 7 days before rebalancing. - Added quote_asset parameter to filter perpetual symbols by asset, defaulting to USDT. - Improved logging to reflect filtering by quote asset and detailed rebalance planning. - Adjusted batch processing parameters for better API call management. * chore: new demo * fix: readme to latest * fix: make three demo working fine * fix: change default export path structure * fix ci problem --------- Co-authored-by: min <[email protected]>
1 parent a65a919 commit 99f0d7d

File tree

4 files changed

+208
-5
lines changed

4 files changed

+208
-5
lines changed

.github/workflows/python-publish.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
uses: python-semantic-release/python-semantic-release@master
5858
with:
5959
github_token: ${{ secrets.GITHUB_TOKEN }}
60-
changelog: "true"
6160
git_committer_name: "github-actions"
6261
git_committer_email: "[email protected]"
6362

@@ -95,7 +94,18 @@ jobs:
9594
id: changelog
9695
if: steps.release.outputs.released == 'true'
9796
run: |
98-
CHANGELOG=$(cat CHANGELOG.md | sed -n "/## v${{ steps.release.outputs.version }}/,/## v/p" | sed '$d')
97+
# 使用 semantic release 生成的 changelog
98+
if [ -f "CHANGELOG.md" ]; then
99+
# 提取当前版本的 changelog 内容
100+
CHANGELOG=$(awk "/## v${{ steps.release.outputs.version }}/{flag=1; next} /## v/{flag=0} flag" CHANGELOG.md)
101+
if [ -z "$CHANGELOG" ]; then
102+
# 如果没有找到版本特定的内容,尝试提取第一个版本块
103+
CHANGELOG=$(awk '/## v/{if(first){exit} first=1; next} first' CHANGELOG.md)
104+
fi
105+
else
106+
CHANGELOG="No changelog available"
107+
fi
108+
99109
echo "changelog<<EOF" >> $GITHUB_OUTPUT
100110
echo "$CHANGELOG" >> $GITHUB_OUTPUT
101111
echo "EOF" >> $GITHUB_OUTPUT

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CHANGELOG
22

3+
<!-- next-version -->
34

45
## v0.5.0 (2025-03-22)
56

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,44 @@ commit_message = "chore(release): v{version}"
4747
tag_format = "v{version}"
4848
major_on_zero = false
4949

50+
[tool.semantic_release.changelog]
51+
changelog_file = "CHANGELOG.md"
52+
template_dir = "templates"
53+
exclude_commit_patterns = [
54+
"^chore",
55+
"^ci",
56+
"^test",
57+
"^docs",
58+
"^style",
59+
"^refactor",
60+
"Merge pull request",
61+
"Merge branch",
62+
]
63+
mode = "update"
64+
insertion_flag = "<!-- next-version -->"
65+
66+
[tool.semantic_release.changelog.environment]
67+
block_start_string = "{%"
68+
block_end_string = "%}"
69+
variable_start_string = "{{"
70+
variable_end_string = "}}"
71+
72+
[tool.semantic_release.commit_parser_options]
73+
allowed_tags = [
74+
"feat",
75+
"fix",
76+
"docs",
77+
"style",
78+
"refactor",
79+
"perf",
80+
"test",
81+
"chore",
82+
"ci",
83+
"build",
84+
]
85+
minor_tags = ["feat"]
86+
patch_tags = ["fix", "perf"]
87+
5088
[tool.ruff]
5189
# 基本配置
5290
line-length = 120
@@ -127,5 +165,6 @@ dev = [
127165
"mkdocstrings[python]>=0.29.1",
128166
"mypy>=1.16.0",
129167
"pandas-stubs>=2.2.3.250527",
168+
"python-semantic-release>=10.1.0",
130169
]
131170
test = ["pytest>=8.3.5", "pytest-cov>=6.1.1"]

0 commit comments

Comments
 (0)