Skip to content

Commit 8ecdba8

Browse files
committed
chore: 合并 develop 到 main,发布版本 1.9.1
2 parents e15c54b + 4e92f68 commit 8ecdba8

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,20 @@ jobs:
158158
TAG_NAME: ${{ github.ref_name }}
159159
run: |
160160
$scriptContent = @'
161+
# -*- coding: utf-8 -*-
161162
import json
162163
import os
163164
import sys
164165
import time
165166
import urllib.request
166167
from datetime import datetime
167168
169+
# Fix encoding for Windows console
170+
if sys.platform == 'win32':
171+
import io
172+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
173+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
174+
168175
def get_release_with_retry(api_url, headers, package_file_name="DuckovCustomModel.zip", max_retries=15, retry_delay=3):
169176
last_error = None
170177
release = None
@@ -335,12 +342,19 @@ jobs:
335342
RELEASE_DOWNLOAD_LINKS: ${{ steps.release_info.outputs.download_links }}
336343
run: |
337344
$scriptContent = @'
345+
# -*- coding: utf-8 -*-
338346
import json
339347
import os
340348
import sys
341349
import time
342350
import urllib.request
343351
352+
# Fix encoding for Windows console
353+
if sys.platform == 'win32':
354+
import io
355+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
356+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
357+
344358
def parse_download_links_from_json(json_str):
345359
if not json_str or not json_str.strip():
346360
return None

0 commit comments

Comments
 (0)