Add Snap Store packaging and CI publish - #196
Conversation
- 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>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
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 to2.14.1separately. 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.debor 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
📒 Files selected for processing (2)
.github/workflows/deploy.ymlsnap/snapcraft.yaml
- 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>
|



Summary
snap/snapcraft.yamlfor Snap Store distributionsnap-publishCI job todeploy.ymlthat builds and publishes the snap on releaseDetails
The snap reuses the existing
.debartifact from the Linux build (no duplicate compilation). It exposes two apps:qtmesheditor— GUI with gnome extension, opengl/x11/wayland/desktop plugsqtmesh— CLI with offscreen rendering for headless batch processingThe CI job runs after
build-linuxon release events, downloads the.debartifact, builds the snap viasnapcore/action-build, and publishes to the Snap Store viasnapcore/action-publishusing theSNAP_STORE_TOKENsecret.After merge and next release, users can install with:
Test plan
sudo snap install qtmesheditorfrom the Snap Store🤖 Generated with Claude Code
Summary by CodeRabbit