Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install nuitka zstandard

- name: Build with Nuitka
working-directory: src
run: |
Expand All @@ -46,15 +46,15 @@ jobs:
--windows-icon-from-ico=icon.ico
shell: bash

# Windows
# Windows artifact upload
- name: Upload Windows artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: 123pan-windows
path: src/123pan.exe

# Linux
# Linux artifact upload
- name: Upload Linux artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
Expand All @@ -68,15 +68,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download artifacts
- name: Download Windows artifact
if: runner.os == 'Linux'
uses: actions/download-artifact@v4
with:
name: 123pan-windows
path: ./artifacts/windows

- name: Download Linux artifact
if: runner.os == 'Linux'
uses: actions/download-artifact@v4
with:
path: artifacts
name: 123pan-linux
path: ./artifacts/linux

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: all_binaries/*
files: |
./artifacts/windows/123pan.exe
./artifacts/linux/123pan
generate_release_notes: true
1 change: 1 addition & 0 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def up_load(self, file_path):
raise RuntimeError("同名文件存在")
if res_code_up != 0:
raise RuntimeError(f"上传请求失败: {up_res_json}")
up_file_id = up_res_json["data"]["FileId"]
if up_res_json["data"].get("Reuse", False):
return up_file_id

Expand Down
Loading
Loading