chore: fix workflow erros

This commit is contained in:
2061360308 2023-12-20 01:22:32 +08:00
parent b9e7360626
commit bc79a64ed8
8 changed files with 19 additions and 29 deletions

View File

@ -4,5 +4,5 @@ commit = True
tag = True tag = True
[bumpversion:file:package/setup.py] [bumpversion:file:package/setup.py]
[bumpversion:file:towncrier.toml]
[bumpversion:file:package/NeteaseCloudMusic/__init__.py] [bumpversion:file:package/NeteaseCloudMusic/__init__.py]

View File

@ -1,22 +0,0 @@
name: Test Workflow
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Print Python version
run: python --version

6
CHANGELOG.md Normal file
View File

@ -0,0 +1,6 @@
0.1.7 (2023-12-20)
### Bugfixes
- 重新利用Max-Age判断cookie是否过期 (cookie_expires)
- 修复因为补充的encodeURIComponent函数无法识别非字符的True或False而导致的cookie项remberme为空从而使login_refresh接口返回400的问题 (login_refresh)

View File

@ -1 +0,0 @@
重新利用Max-Age判断cookie是否过期

View File

@ -1 +0,0 @@
修复因为补充的encodeURIComponent函数无法识别非字符的True或False而导致的cookie项remberme为空从而使login_refresh接口返回400的问题

View File

View File

@ -50,8 +50,13 @@ with open(os.path.join(here, 'README.md'), 'w+', encoding='utf-8') as f:
print("copy README.md end") print("copy README.md end")
try: try:
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f: if os.path.exists(os.path.join(here, '../release_notes.txt')):
changelog = f.read() # 优先读取release_notes.txt工作流自动生成的当前版本的更新内容
with open(os.path.join(here, '../release_notes.txt'), 'r', encoding='utf-8') as f:
changelog = f.read()
else:
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f:
changelog = f.read()
except FileNotFoundError: except FileNotFoundError:
changelog = '' changelog = ''
@ -59,7 +64,7 @@ except FileNotFoundError:
# Note: this will only work if 'README.md' is present in your MANIFEST.in file! # Note: this will only work if 'README.md' is present in your MANIFEST.in file!
try: try:
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + changelog + '\n' + f.read() long_description = '\n' + "# 更新信息" + "\n" + changelog + '\n' + f.read()
except FileNotFoundError: except FileNotFoundError:
long_description = DESCRIPTION long_description = DESCRIPTION

View File

@ -10,3 +10,6 @@ subprocess.check_call(['git', 'push', '--tags'])
# Run towncrier # Run towncrier
subprocess.check_call(['towncrier', '--yes']) subprocess.check_call(['towncrier', '--yes'])
if not os.path.isdir('./newsfragments'):
os.mkdir('./newsfragments')