Skip to content

ci(build-tauri): expose Linux AppImage/deb/rpm bundles as artifacts#1302

Merged
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix-tauri-linux-bundle
May 9, 2026
Merged

ci(build-tauri): expose Linux AppImage/deb/rpm bundles as artifacts#1302
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix-tauri-linux-bundle

Conversation

@TimeToBuildBob
Copy link
Copy Markdown
Contributor

Problem

aw-tauri's Tauri bundler already produces .AppImage, .deb, and .rpm files under dist/activitywatch/aw-tauri/ on Linux runs, but the upload-artifact step in .github/workflows/build-tauri.yml only globs dist/activitywatch-*.*. As a result the Linux Tauri bundles were silently dropped from build artifacts (and from drafted releases), even though Linux ZIPs do get uploaded.

This is what @ErikBjare flagged in #1300:

@TimeToBuildBob that PR is to the aw-tauri repo, not this bundle repo. PR needed to this repo too.

Change

Add a Linux-only Package Linux (Tauri bundles) step that copies the bundler outputs out with versioned, arch-suffixed filenames so they match the existing upload glob:

  • activitywatch-tauri-${VERSION_WITH_V}-linux-${ARCH}.AppImage
  • activitywatch-tauri-${VERSION_WITH_V}-linux-${ARCH}.deb
  • activitywatch-tauri-${VERSION_WITH_V}-linux-${ARCH}.rpm

shopt -s nullglob keeps the step a no-op if any extension is missing (e.g. if rpm packaging is disabled in tauri.conf.json for some build), instead of failing on a literal *.rpm glob.

Out of scope

  • No changes to Windows or macOS jobs
  • No changes to build.yml (non-Tauri build, already has its own AppImage/deb steps)
  • aw-tauri's own arm64 ARCH detection is broken (uname -m returns aarch64 on Linux arm64 but the Makefile checks for arm64); that's an aw-tauri Makefile bug, not part of this PR

Verification

  • YAML parses (python3 -c "import yaml; yaml.safe_load(open('.github/workflows/build-tauri.yml'))")
  • Workflow lint will run on the PR
  • Final verification will be the next master push, where the Tauri Linux runs should produce activitywatch-tauri-*-linux-x86_64.{AppImage,deb,rpm} artifacts visible in the workflow run

Closes the bundle-repo half of #1300.

aw-tauri's Tauri bundler already produces .AppImage/.deb/.rpm files under
dist/activitywatch/aw-tauri/ on Linux runs, but the upload-artifact step
only globs dist/activitywatch-*.*, so they were silently dropped from the
build artifacts (and therefore from drafted releases).

Add a Linux-only step that copies the bundles out with versioned,
arch-suffixed filenames (activitywatch-tauri-$VERSION-linux-$ARCH.$ext)
so they match the existing upload pattern. No changes to Windows or
macOS jobs.

Refs: ActivityWatch#1300
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR fixes a gap in the Tauri build pipeline where Linux .AppImage, .deb, and .rpm bundles produced by the Tauri bundler were silently excluded from uploaded artifacts because the upload glob (dist/activitywatch-*.*) only matched files directly in dist/, not those nested under dist/activitywatch/aw-tauri/.

  • New Linux packaging step runs after make package, reads VERSION_WITH_V from the environment and uname -m for architecture, then copies each bundle type into a flat dist/activitywatch-tauri-${VERSION_WITH_V}-linux-${ARCH}.${ext} path that the existing upload step already picks up.
  • Robustness guards: shopt -s nullglob makes the step a no-op for absent bundle types; an explicit count check (0 → skip, 1 → copy, >1 → exit 1) prevents silent overwrites and fails fast on unexpected duplicates.

Confidence Score: 5/5

Safe to merge. The change is additive and Linux-only, with no impact on macOS or Windows jobs.

The new step is guarded by runner.os == 'Linux', uses only well-established bash constructs (nullglob, array count via ${#files[@]}, case), and relies on VERSION_WITH_V already written to $GITHUB_ENV by an earlier step. The resulting filenames match the existing dist/activitywatch-*.* upload glob. The previous review concern about silent overwrites has been addressed with an explicit count check that exits non-zero on unexpected duplicates.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/build-tauri.yml Adds a Linux-only packaging step that copies Tauri bundles (.AppImage/.deb/.rpm) into versioned, arch-suffixed filenames matching the existing upload glob; uses nullglob + count guard to handle missing or unexpected duplicate files safely.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[make package] --> B{runner.os == Linux?}
    B -- No --> E[Package dmg / skip]
    B -- Yes --> C[Package Linux - Tauri bundles]
    C --> D1[ARCH = uname -m]
    D1 --> D2[shopt -s nullglob]
    D2 --> LOOP["for ext in AppImage deb rpm"]
    LOOP --> COUNT{"count of dist/activitywatch/aw-tauri/*.ext"}
    COUNT -- "0" --> SKIP[continue]
    COUNT -- "1" --> COPY["cp → dist/activitywatch-tauri-VERSION-linux-ARCH.ext"]
    COUNT -- ">1" --> FAIL[exit 1]
    SKIP --> LOOP
    COPY --> LOOP
    LOOP -- done --> UPLOAD["Upload packages\ndist/activitywatch-*.*"]
Loading

Reviews (2): Last reviewed commit: "ci(build-tauri): guard against multiple ..." | Re-trigger Greptile

Comment thread .github/workflows/build-tauri.yml Outdated
If more than one file of the same extension lands in the bundler
output dir, fail fast instead of silently keeping only the last copy.
Addresses Greptile P2 review feedback.
@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

@greptileai review

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Verified against the PR workflow artifacts from run 25599978825:

  • builds-tauri-ubuntu-24.04-py3.9 now contains standalone
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-x86_64.AppImage
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-x86_64.deb
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-x86_64.rpm
    • plus the existing .zip
  • builds-tauri-ubuntu-24.04-arm-py3.9 now contains standalone
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-aarch64.AppImage
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-aarch64.deb
    • activitywatch-tauri-v0.13.3b1.dev-8edff31-linux-aarch64.rpm
    • plus the existing .zip

So the bundle-repo half of #1300 is working as intended on both Linux architectures. I tried to merge / enable auto-merge from here, but this token does not have the required repo permissions.

@ErikBjare ErikBjare merged commit 7c5b49b into ActivityWatch:master May 9, 2026
15 checks passed
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