Skip to content

ci: add daily build workflow with auto cleanup - #137

Open
1368129224 wants to merge 2 commits into
VirtualHotBar:mainfrom
1368129224:daily-build-pr
Open

ci: add daily build workflow with auto cleanup#137
1368129224 wants to merge 2 commits into
VirtualHotBar:mainfrom
1368129224:daily-build-pr

Conversation

@1368129224

Copy link
Copy Markdown

Summary

Adds a new daily build workflow that automatically creates development builds for all 6 target platforms every day.

What this workflow does

  • Runs daily at 2:00 UTC (or manually via workflow_dispatch)
  • Builds Tauri app for 6 platforms: Linux/macOS/Windows × x86_64/aarch64
  • Creates a prerelease with tag daily-v{version}-{short_sha}
  • Uploads portable ZIP for Windows targets
  • Auto-cleans old daily releases, keeping only the latest 5

Artifacts

Platform Arch Formats
Linux x86_64, arm64 .deb, .rpm, .AppImage
macOS x86_64, arm64 .dmg, .app.tar.gz
Windows x86_64, arm64 .exe (NSIS installer), portable .zip

Requirements

No new secrets needed — uses the same TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD already configured for main.yml.

@1368129224
1368129224 force-pushed the daily-build-pr branch 3 times, most recently from d9e1e54 to 6e5c970 Compare July 7, 2026 08:20
@VirtualHotBar

Copy link
Copy Markdown
Owner

Request changes

发现两个需要在合并前修复的问题:

  1. Windows portable ZIP 缺少运行时依赖

.github/workflows/daily-build.yml:226-237 只将 NetMount.exe.portable 打包进 ZIP。但 src-tauri/tauri.conf.json:16 配置了 binaries/**/* 资源,程序还会在 src-tauri/src/lib.rs:545-553:788-799 运行时查找 binaries/<sidecar>-<target>

因此当前 portable ZIP 很可能可以启动,但在使用 rcloneopenlist 时会因 sidecar 缺失而失败。请将所需 sidecar 及便携模式需要的其他运行资源一并打包,并增加解压后运行的 smoke test。

  1. 矩阵任务并发操作同一个 Release

.github/workflows/daily-build.yml:189-205 中所有矩阵任务都使用相同的 tagName,并由 tauri-apps/tauri-action@v0 创建或更新 Release。多个任务可能同时竞争创建同一个 Release,或者并发上传/更新 latest.json。如果某个平台构建失败,还可能留下只有部分平台资源的公开 prerelease。

现有 .github/workflows/main.yml 已经采用更可靠的流程:先单独创建 draft Release,再将 releaseId 传给矩阵任务,最后在所有构建成功后发布。Daily build 建议复用这一模式。

另外还有两个需要确认的点:

  • windows-11-arm runner label 在本地 actionlint 中被报告为未知,需要确认 GitHub Actions 当前是否支持该 label。
  • RCLONE_VERSION: "current" 会使缓存 key 长期不变,可能导致 daily build 持续使用旧版 rclone。
  • 清理逻辑只查询最近 100 个 Release,且删除 Release 时没有使用 --cleanup-tag,可能留下旧 Release 或孤立 tag。

本地 YAML 解析、TypeScript 类型检查和 ESLint 均通过;由于无法在本地执行 GitHub Actions 矩阵,以上 workflow 行为仍需要在 GitHub 环境中验证。

zengzhichao233 and others added 2 commits September 4, 2026 09:20
…ndition

- Package sidecar binaries (rclone/openlist) and winfsp.msi into the
  Windows portable ZIP alongside NetMount.exe, matching the binaries/
  resource layout the app looks up at runtime via resolve_resource
  (Windows resource_dir == exe dir). Add a post-extract smoke test that
  fails the build if the exe, .portable marker, or sidecars are missing.
- Split the daily-build release flow into create-release (single draft
  prerelease) -> build (uploads via releaseId) -> publish-release
  (undrafts only after all matrix legs succeed), removing the race where
  every matrix job created/updated the same tagged Release concurrently
  and could leave a public prerelease with only partial platform assets.
- Resolve the actual current rclone version from
  downloads.rclone.org/version.txt and use it in the binaries cache key
  instead of the static literal "current", so the daily build picks up
  new rclone releases instead of reusing a stale cached binary forever.
- Widen release cleanup to fetch up to 1000 releases, only prunes
  published (non-draft) daily prereleases, and pass --cleanup-tag when
  deleting so orphaned tags aren't left behind.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants