← Back to issue list

feat: create new snapcraft-pack action

View original Github issue

Metadata

Project
craft-actions
Number
#45
Type
pull request
State
merged
Author
bepri
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 8756708, adding a snapcraft/pack action modeled on charmcraft/pack, with shared common/ workflows, working `path` input, and snap/ dir added to the cache key. All CI checks passed; docs followed in #46.

Resolution: closed resolved

Reason: PR #45 was approved by three reviewers with all CI checks green and merged to main as commit 8756708 ('feat: create new snapcraft-pack action'). The remaining docs task was completed in follow-up PR #46 (commit 61c29f2), and snapcraft/pack/action.yaml now exists in the repo.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Adds a new action for setting up Snapcraft and then packing a snap, taking _huge_ inspiration from the existing Charmcraft one. The code is identical to Charmcraft other than the following points, which I will hopefully merge into the Charmcraft half soon after this lands: - "Upstreamed" fetching a snap revision to a repo-private set of "common" workflows - Rephrased some doc strings to be slightly less jargon-y and slightly more proper English - Made the `path` variable for `snapcraft/pack` work - Also hash the `snap/` directory for the cache key (I'm not adding this one to Charmcraft obviously) Working use of the workflow on Snapcraft: https://github.com/canonical/snapcraft/pull/5898 Outstanding tasks: - [ ] Add workflow docs to README

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 8756708, adding a snapcraft/pack action modeled on charmcraft/pack, with shared common/ workflows, working `path` input, and snap/ dir added to the cache key. All CI checks passed; docs followed in #46.
stealth/space-bunny-alpha — closed resolved Merged PR #45 as 8756708, introducing snapcraft-pack with shared common workflows, working path support, and snap/ cache-key hashing. All CI checks passed.
qwen/qwen3.6-35b-a3b — — Merged a new snapcraft-pack GitHub Action for automated Snapcraft setup and packaging. Implements upstreamed workflows, cache key improvements, and path variable fixes. Approved by three reviewers, passed all CI checks. README documentation to follow.

Update history

No update history recorded yet.

Related work

  • Related To: craft-actions#46 (confidence 92%)

    Follow-up docs PR splitting the README per action, incorporating wording from #45; merged as 61c29f2 and addresses #45's outstanding docs task.

  • Related To: craft-actions#100 (confidence 70%)

    Later merged PR (8bf30ed) rewriting snapcraft/pack as a Node-based action, evolving the action introduced here.

  • Related To: canonical/snapcraft#5898 (confidence 45%)

    Referenced in the PR body as the working downstream consumer of the new snapcraft-pack workflow.

Related issues

Issue Project State Summary Similarity
#307 ci: pack snap using craft-actions imagecraft merged Merged in commit 3f26a09 via #307, replacing action-build with canonical/craft-actions' Snapcraft pack action.
81%
#100 feat(snapcraft/pack): node-based rewrite craft-actions merged Merged #100 (CRAFT-5204): rewrote the snapcraft/pack action in Node, fixing Snapcraft 7 default-command handling, adding .comp output support and unit tests. Approved by 2 reviewers, all CI jobs green.
75%
#50 test: test the snapcraft actions craft-actions merged Merged PR #50 added Snapcraft action tests adapted from Charmcraft’s suite, with all reported CI checks passing.
74%
#55 feat: support 'pack' command craft-actions merged Merged PR #55 as commit abf3fbd, adding version-aware `snapcraft pack` support while retaining legacy `snapcraft` calls for older versions. Fixes #53.
74%
#4794 feat: allow packing a directory snapcraft merged Merged PR #4794 (commit 48483c4e3) restores `snapcraft pack <directory>`, fixing the 8.2 regression where the directory argument was ignored when locating snapcraft.yaml; closes issue #4769 (CRAFT-2861).
73%
#438 ci: use snaps output from snapcraft pack action imagecraft merged Merged #438 to use the snapcraft pack action's plural `snaps` output, preventing empty artifact paths and restoring snap upload and publishing.
72%
#351 feat: add a default snapcraft.yaml starbase open Adds a default 54-line snap/snapcraft.yaml to the starbase template so downstream craft projects can `make pack-snap`. Open 597 days, 1 approval, 8 unresolved review comments, no CI.
72%
#105 feat: charmcraft/pack with typescript craft-actions merged Merged PR canonical/craft-actions#105 rewrote charmcraft/pack in TypeScript to match the other pack actions (CRAFT-5205); approved by 2 reviewers, all CI (setup/pack/test-action-code, run-rockcraft-pack-action) passing, +20585/-138 across 14 files.
71%
#3639 commands: add pack command and set it as default (CRAFT-762) snapcraft merged Merged PR #3639 added the pack command and made it the default for creating a snap package. Landed via merge commit 2cdb81ed4.
71%
#6367 docs: add a "pack a Pro snap" how-to snapcraft merged Merged #6367 (CRAFT-5236), adding the “Pack a Pro snap” how-to after its craft-application#1144 documentation dependency landed.
71%