🔧 build: 更新构建内容

This commit is contained in:
imsyy
2025-10-17 02:47:02 +08:00
parent 82f6b4607b
commit e18828cd08
2 changed files with 19 additions and 16 deletions

View File

@@ -51,11 +51,11 @@ jobs:
run: pnpm run build:win -- --${{ matrix.arch }} || true run: pnpm run build:win -- --${{ matrix.arch }} || true
env: env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 上传构建产物 # 合并所有 Windows 构建
- name: Upload artifacts - name: Upload Windows artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: SPlayer-Win-${{ matrix.arch }} name: SPlayer-Windows
if-no-files-found: ignore if-no-files-found: ignore
path: | path: |
dist/*.exe dist/*.exe
@@ -106,7 +106,7 @@ jobs:
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: SPlayer-macOS-${{ matrix.arch }} name: SPlayer-macOS
if-no-files-found: ignore if-no-files-found: ignore
path: | path: |
dist/*.dmg dist/*.dmg
@@ -171,11 +171,13 @@ jobs:
snapcraft upload dist/*.snap --release stable || echo "Snap upload failed or not configured" snapcraft upload dist/*.snap --release stable || echo "Snap upload failed or not configured"
fi fi
continue-on-error: true continue-on-error: true
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
# 上传构建产物 # 上传构建产物
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: SPlayer-Linux-${{ matrix.arch }} name: SPlayer-Linux
if-no-files-found: ignore if-no-files-found: ignore
path: | path: |
dist/*.AppImage dist/*.AppImage
@@ -204,7 +206,7 @@ jobs:
with: with:
path: artifacts path: artifacts
# 列出下载的产物(用于调试) # 列出下载的产物(用于调试)
- name: List downloaded artifacts (for debugging) - name: List downloaded artifacts
run: ls -R artifacts run: ls -R artifacts
# 创建 GitHub Release 并上传所有产物 # 创建 GitHub Release 并上传所有产物
- name: Create GitHub Release and Upload Assets - name: Create GitHub Release and Upload Assets
@@ -214,4 +216,14 @@ jobs:
generate_release_notes: true generate_release_notes: true
# 全部上传 # 全部上传
files: | files: |
artifacts/**/* artifacts/SPlayer-Windows/!(builder-debug).yml
artifacts/SPlayer-macOS/!(builder-debug).yml
artifacts/SPlayer-Linux/!(builder-debug).yml
artifacts/**/*.exe
artifacts/**/*.dmg
artifacts/**/*.zip
artifacts/**/*.tar.gz
artifacts/**/*.deb
artifacts/**/*.rpm
artifacts/**/*.AppImage
artifacts/**/*.snap

View File

@@ -133,12 +133,3 @@ appImage:
artifactName: ${name}-${version}-${arch}.${ext} artifactName: ${name}-${version}-${arch}.${ext}
# 是否在构建之前重新编译原生模块 # 是否在构建之前重新编译原生模块
npmRebuild: false npmRebuild: false
# 自动更新的配置
publish:
# 更新提供商
provider: github
# 自动更新检查的 URL
# url: https://example.com/auto-updates
owner: "imsyy"
repo: "SPlayer"
releaseType: release