Skip to content

Add Snap Store packaging and CI publish - #196

Merged
fernandotonon merged 2 commits into
masterfrom
feature/snap-store
Mar 16, 2026
Merged

Add Snap Store packaging and CI publish#196
fernandotonon merged 2 commits into
masterfrom
feature/snap-store

Conversation

@fernandotonon

@fernandotonon fernandotonon commented Mar 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add snap/snapcraft.yaml for Snap Store distribution
  • Add snap-publish CI job to deploy.yml that builds and publishes the snap on release

Details

The snap reuses the existing .deb artifact from the Linux build (no duplicate compilation). It exposes two apps:

  • qtmesheditor — GUI with gnome extension, opengl/x11/wayland/desktop plugs
  • qtmesh — CLI with offscreen rendering for headless batch processing

The CI job runs after build-linux on release events, downloads the .deb artifact, builds the snap via snapcore/action-build, and publishes to the Snap Store via snapcore/action-publish using the SNAP_STORE_TOKEN secret.

After merge and next release, users can install with:

sudo snap install qtmesheditor

Test plan

  • Verify CI passes (no snap build on PRs, only on release)
  • On next release, verify snap-publish job runs and publishes successfully
  • Test sudo snap install qtmesheditor from the Snap Store

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a Snap package for both the GUI application and its CLI, bringing native Snap installation and required runtime libraries.
  • Chores
    • Enabled automated publishing to the Snap Store.
    • Expanded Docker image publishing to Docker Hub and GitHub Container Registry with versioned and latest tags and post-publish verification.

- snap/snapcraft.yaml: Snap package definition reusing the existing .deb
  artifact. Exposes GUI (qtmesheditor) and CLI (qtmesh) apps with strict
  confinement and gnome extension for desktop integration.
- CI snap-publish job: builds the snap after the Linux .deb and publishes
  to the Snap Store on release using SNAP_STORE_TOKEN secret.

Users can install with: sudo snap install qtmesheditor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee1ccbcd-a52a-4824-9de9-b732c85e4721

📥 Commits

Reviewing files that changed from the base of the PR and between 8df01c6 and d5c13d6.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • snap/snapcraft.yaml

📝 Walkthrough

Walkthrough

Adds CI steps to build and publish Docker images and Snap packages after Linux binaries are produced, and adds a new snapcraft.yaml that packages the GUI and CLI from the built .deb and declares runtime dependencies and snap metadata.

Changes

Cohort / File(s) Summary
CI/CD Publishing Workflows
\.github/workflows/deploy.yml
Adds snap-publish job to build and publish a Snap to the Snap Store and expands docker-publish to run after the Linux .deb is produced, download the linux-binaries artifact, compute versioned tags, build images, push to GHCR and Docker Hub, and verify pushed images.
Snap Packaging Configuration
snap/snapcraft.yaml
New Snapcraft manifest defining qtmesheditor (GUI) and qtmesh (CLI) apps, snap metadata, a qtmesheditor part that extracts the project .deb (or downloads it in CI), extracts and sets snap version, adjusts plugin paths, and lists stage-packages for runtime libraries.

Sequence Diagram(s)

sequenceDiagram
    participant Actions as GitHub Actions (deploy.yml)
    participant Art as Artifact Storage
    participant Docker as Docker Registries (GHCR / Docker Hub)
    participant SnapStore as Snap Store
    participant Runner as CI Runner

    Actions->>Runner: trigger docker-publish & snap-publish after build-linux
    Runner->>Art: download linux-binaries artifact (.deb)
    Runner->>Runner: extract .deb, determine version, prepare build context
    Runner->>Docker: build docker images (versioned + latest) and push
    Docker-->>Runner: push confirmation & image verification
    Runner->>SnapStore: build snap from .deb and publish using stored credentials
    SnapStore-->>Runner: publish confirmation
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through CI with a joyful cheer,

Snaps and Docker rolling out, far and near.
From .deb to store, and images that gleam,
QtMesh takes flight on every stream. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding Snap Store packaging via snapcraft.yaml and a CI publish job in deploy.yml.
Description check ✅ Passed The description covers all required template sections with clear summaries, technical details, and test plan; it exceeds template expectations with comprehensive context and installation instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/snap-store
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
snap/snapcraft.yaml (1)

2-2: Avoid maintaining a second manual release version here.

This snap is built from a release .deb, but the Store metadata is pinned to 2.14.1 separately. That makes it easy to publish a newer payload under stale version metadata if this line is missed in a future release. Deriving the snap version from the .deb or the release tag would keep the publish path single-sourced.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@snap/snapcraft.yaml` at line 2, The snapcraft.yaml currently hardcodes the
version field (version: '2.14.1'); remove this manual value and make the snap
version single-sourced by deriving it from the upstream .deb or the release tag
at build time. Update the version key in snap/snapcraft.yaml to accept a
build-time value (e.g., from an environment variable or by extracting the
Version field from the .deb via dpkg-deb/dpkg-query) and modify the CI/build
script that produces the snap to set that variable (or inject the extracted
value) so the snap version always matches the .deb/release tag instead of being
manually maintained.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy.yml:
- Around line 1570-1573: The "Prepare snap build" step contains a redundant cp
command (the line using cp to copy qtmesheditor_amd64.deb to
snap/../qtmesheditor_amd64.deb) which normalizes to the same path and will fail;
remove that cp invocation from the "Prepare snap build" step (i.e., delete the
cp qtmesheditor_amd64.deb snap/../qtmesheditor_amd64.deb line) so the workflow
uses the artifact already present at the workspace root and allows the
snapcore/action-build step to proceed.
- Around line 1575-1583: Update the GitHub Actions workflow to pin the Snap
actions to the specified immutable commit SHAs instead of mutable tags: replace
uses: snapcore/action-build@v1 with uses:
snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 and replace uses:
snapcore/action-publish@v1 with uses:
snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 so the build
step (id: build) and the publish step use the given SHAs for reproducible,
immutable action versions.

---

Nitpick comments:
In `@snap/snapcraft.yaml`:
- Line 2: The snapcraft.yaml currently hardcodes the version field (version:
'2.14.1'); remove this manual value and make the snap version single-sourced by
deriving it from the upstream .deb or the release tag at build time. Update the
version key in snap/snapcraft.yaml to accept a build-time value (e.g., from an
environment variable or by extracting the Version field from the .deb via
dpkg-deb/dpkg-query) and modify the CI/build script that produces the snap to
set that variable (or inject the extracted value) so the snap version always
matches the .deb/release tag instead of being manually maintained.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 943c0fb9-edcf-4bba-ba8c-f7c4f77f4e23

📥 Commits

Reviewing files that changed from the base of the PR and between b51c146 and 8df01c6.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • snap/snapcraft.yaml

Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml Outdated
- Remove redundant cp command that copies .deb onto itself (snap/.. = .)
- Pin snapcore/action-build and action-publish to immutable commit SHAs
- Derive snap version from .deb metadata via adopt-info + craftctl

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fernandotonon
fernandotonon merged commit ed8634c into master Mar 16, 2026
10 of 11 checks passed
@fernandotonon
fernandotonon deleted the feature/snap-store branch March 16, 2026 01:23
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant