mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
chore: 优化可执行文件构建流程
This commit is contained in:
parent
5463854906
commit
2c9ca72f4d
@ -1,11 +1,11 @@
|
||||
name: Manually build executable programs
|
||||
name: 手动构建可执行文件
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
name: 构建于 ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 签出存储库
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 设置 Python
|
||||
uses: actions/setup-python@v5
|
||||
@ -29,13 +29,13 @@ jobs:
|
||||
- name: 构建 Win 可执行文件
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" --collect-all emoji main.py
|
||||
shell: pwsh
|
||||
|
||||
- name: 构建 Mac 可执行文件
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" main.py
|
||||
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" --collect-all emoji main.py
|
||||
|
||||
- name: 上传文件
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
name: Release build executable program
|
||||
name: 发布构建可执行文件
|
||||
|
||||
on:
|
||||
release:
|
||||
@ -10,7 +10,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
name: 构建于 ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 签出存储库
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 设置 Python
|
||||
uses: actions/setup-python@v5
|
||||
@ -34,13 +34,13 @@ jobs:
|
||||
- name: 构建 Win 可执行文件
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" --collect-all emoji main.py
|
||||
shell: pwsh
|
||||
|
||||
- name: 构建 Mac 可执行文件
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" main.py
|
||||
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" --collect-all emoji main.py
|
||||
|
||||
- name: 创建压缩包
|
||||
run: |
|
||||
|
||||
7
.github/workflows/docker-image.yml
vendored
7
.github/workflows/docker-image.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build and Push Docker Image
|
||||
name: 自动构建并发布 Docker 镜像
|
||||
|
||||
on:
|
||||
release:
|
||||
@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 拉取源码
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
@ -34,6 +34,3 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Post build notifications
|
||||
run: echo "Docker image has been built and pushed successfully"
|
||||
|
||||
@ -9,4 +9,4 @@ httpx>=0.27.0
|
||||
fastapi>=0.112.1
|
||||
uvicorn>=0.30.6
|
||||
aiofiles>=24.1.0
|
||||
emoji>=2.12.1
|
||||
emoji>=2.14.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user