Skip to content

增加Linux支持 - #11

Merged
appergb merged 3 commits into
Open-Less:mainfrom
H-Chris233:main
Apr 29, 2026
Merged

增加Linux支持#11
appergb merged 3 commits into
Open-Less:mainfrom
H-Chris233:main

Conversation

@H-Chris233

@H-Chris233H-Chris233 commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

增加Linux系统支持,在release中加入deb,rpm和AppImage

Closes#9

The repository already had a single cross-platform release workflow for macOS and Windows.
This change extends the same workflow matrix with Ubuntu so Linux packaging runs in the
same release lane and publishes deb/rpm/AppImage artifacts consistently.
Constraint: Keep existing macOS and Windows release behavior unchanged
Constraint: User requested minimum-scope change in existing workflow rather than new pipeline
Rejected: Add a separate Linux workflow file | would duplicate release logic and increase drift risk
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep Linux package paths aligned with Tauri bundle output dirs when upgrading Tauri
Tested: YAML parse check for .github/workflows/release-tauri.yml
Not-tested: End-to-end GitHub Actions run in remote CI after push
@sourcery-ai

sourcery-aiBot commented Apr 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR extends the existing Tauri release GitHub Actions workflow to build and publish Linux x64 artifacts (.deb, .rpm, .AppImage) alongside the existing macOS and Windows outputs.

Sequence diagram for Linux build and publish path in Tauri release workflow

sequenceDiagram
participant Dev as Developer
participant GH as GitHub_Actions
participant JR as Job_release-tauri_ubuntu-22_04
participant RD as Install_Linux_bundle_deps
participant NPM as Install_npm_deps
participant BT as Build_Tauri
participant BL as Build_Linux_deb_rpm_AppImage
participant UA as Upload_Linux_artifacts
participant GR as GitHub_Release
Dev->>GH: Push_tag_vX-tauri_or_dispatch_workflow
GH->>JR: Start_job_with_matrix_platform_ubuntu-22_04
JR->>RD: Run_apt_get_install_bundle_dependencies
RD-->>JR: Linux_deps_installed
JR->>NPM: npm_ci
NPM-->>JR: Node_modules_installed
JR->>BT: npm_run_tauri_build
BT-->>JR: Core_Tauri_binaries_built
JR->>BL: npm_run_tauri_build_with_bundles_deb_rpm_appimage
BL-->>JR: Linux_packages_deb_rpm_AppImage_created
JR->>UA: Upload_artifacts_deb_rpm_AppImage
UA-->>GH: Artifacts_stored_in_workflow_run
alt Tag_build_with_v-prefix_and_-tauri_suffix
GH->>GR: Create_or_update_release_with_all_assets
GR-->>Dev: Publish_release_with_deb_rpm_AppImage
end
Loading

File-Level Changes

ChangeDetailsFiles
Add Ubuntu/Linux to the Tauri release build matrix and install required system dependencies for bundling.
  • Extend the job matrix with an ubuntu-22.04 runner targeting x86_64-unknown-linux-gnu.
  • Introduce a conditional step that installs all required Linux libraries and tools (GTK/WebKit, audio, indicator, FUSE, SSL, RPM, etc.) via apt-get for bundling Tauri apps.
.github/workflows/release-tauri.yml
Build Linux deb/rpm/AppImage bundles and expose them as workflow artifacts and GitHub Release assets.
  • Add a Linux-only build step invoking npm run tauri -- build --bundles deb,rpm,appimage.
  • Update the artifact listing command to include deb, rpm, and appimage directories for debugging.
  • Add a Linux artifact upload step that collects .deb, .rpm, and .AppImage files as a named workflow artifact.
  • Extend the release upload configuration so GitHub Releases also contain the generated Linux bundling formats.
.github/workflows/release-tauri.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-aisourcery-aiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • On the Ubuntu matrix you now run both the generic npm run tauri build step and the Linux-specific npm run tauri -- build --bundles deb,rpm,appimage, which likely triggers two builds on Linux; consider adding a negated condition to the generic build (e.g. if: matrix.platform != 'ubuntu-22.04') or folding the Linux bundles into a single platform-specific build step to avoid redundant work.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments- On the Ubuntu matrix you now run both the generic `npm run tauri build` step and the Linux-specific `npm run tauri -- build --bundles deb,rpm,appimage`, which likely triggers two builds on Linux; consider adding a negated condition to the generic build (e.g. `if: matrix.platform != 'ubuntu-22.04'`) or folding the Linux bundles into a single platform-specific build step to avoid redundant work.
## Individual Comments### Comment 1
<locationpath=".github/workflows/release-tauri.yml"line_range="171-174" />
<code_context>
run: npm run tauri build
+ # ── Linux:产 deb / rpm / AppImage ──+ - name: Build (Linux)+ if: matrix.platform == 'ubuntu-22.04'+ working-directory: 'openless -all/app'+ run: npm run tauri -- build --bundles deb,rpm,appimage+ # ── 收集产物 ──
</code_context>
<issue_to_address>
**issue (performance):** Avoid running two Tauri builds on the Linux matrix job.
On Ubuntu we now run both the generic `npm run tauri build` and this Linux-specific `npm run tauri -- build --bundles deb,rpm,appimage`, so the Linux build happens twice. Please either limit the earlier "Build (all)" step to macOS/Windows only, or drop this Linux-only step and configure the bundles in `tauri.conf.json` so a single `npm run tauri build` covers all platforms.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread.github/workflows/release-tauri.yml
The workflow logic already runs Windows and Linux builds in separate conditional steps. This note makes the intended split explicit so future edits do not accidentally reintroduce a second Linux build path.
Constraint: Keep changes minimal and scoped to existing release workflow
Rejected: Restructure build steps again in this pass | unnecessary churn for a comment-only review follow-up
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep Linux bundle generation in the dedicated Linux step only
Tested: Parsed .github/workflows/release-tauri.yml with yaml.safe_load
Not-tested: Full GitHub Actions run after this comment-only change
@appergb
appergb merged commit ec9bdb8 into Open-Less:mainApr 29, 2026
1 check passed
Sign up for freeto 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.

Linux端适配

2 participants

@H-Chris233@appergb