Skip to content

ci: fix snap push-metadata (drop --from-yaml, removed in snapcraft 8.x)#27

Merged
aydiler merged 1 commit into
mainfrom
chore/snap-meta-fix
May 24, 2026
Merged

ci: fix snap push-metadata (drop --from-yaml, removed in snapcraft 8.x)#27
aydiler merged 1 commit into
mainfrom
chore/snap-meta-fix

Conversation

@aydiler
Copy link
Copy Markdown
Owner

@aydiler aydiler commented May 24, 2026

The snap-push-metadata workflow dispatched after PR #26 failed:

```
Error: No such option: --from-yaml
```

snapcraft 8.x dropped --from-yaml. Metadata is now read from the .snap file's embedded yaml. So we need to:

  1. Build a fresh snap (with the new snap/snapcraft.yaml embedded)
  2. Run `snapcraft push-metadata --force` — no --from-yaml

This PR:

  • Updates `.github/workflows/snap-push-metadata.yml` to build a fresh snap via `snapcore/action-build@v1` instead of downloading the published one. The downloaded snap embeds the OLD yaml (since v0.1.11 shipped with the short description), so push-metadata on it wouldn't update anything useful.
  • Updates the corresponding step in `.github/workflows/release.yml` to also drop --from-yaml. The build is already happening there for the publish step, so only the flag needed fixing.

After merge: `gh workflow run snap-push-metadata.yml` to dispatch the corrected one-shot.

snapcraft 8.x removed the --from-yaml flag. Metadata is now read from
the .snap file's embedded yaml. Both push-metadata sites (the one-shot
manual workflow and the publish-snap step in release.yml) need to:

1. Build a fresh snap first (so the new snap/snapcraft.yaml is embedded)
2. Call snapcraft push-metadata <snap-file> --force (no --from-yaml)

For the manual workflow this means swapping the 'snap download' step for
snapcore/action-build@v1 — slower (~15 min LXD build) but correct.
For release.yml the build is already happening for the publish step, so
only the flag change is needed.

Reproducer: the snap-push-metadata workflow run dispatched after PR #26
failed with 'Error: No such option: --from-yaml'.
@aydiler aydiler merged commit 71f3bdf into main May 24, 2026
2 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.

1 participant