Skip to content

ci(snap): make snapcraft workflow iterable and add adopt-info - #19

Closed
jmelosegui wants to merge 1 commit into
mainfrom
ci/snap-iterable
Closed

ci(snap): make snapcraft workflow iterable and add adopt-info#19
jmelosegui wants to merge 1 commit into
mainfrom
ci/snap-iterable

Conversation

@jmelosegui

Copy link
Copy Markdown
Owner

Summary

Makes the snap workflow runnable on any branch and clears the next schema validation error so v0.1.1's snap build path can finally make it past validation.

Workflow triggers

  • Add `workflow_dispatch` so we can run the snap workflow on demand.
  • Add `pull_request` filtered to `snap/**` and the workflow file itself, so future PRs that touch the snap config get automatic feedback.
  • Tag-push trigger remains; `snapcraft upload` is now gated on `refs/tags/v*` so PR and dispatch builds stop at `Build snap` and never touch the snap store.
  • `SNAP_VERSION` falls back to `0.0.0-dev` outside tag pushes so the version string is always valid.

`snap/snapcraft.yaml`: add `adopt-info: git-sweep`

The v0.1.1 release run failed validation with:

```
has-base.core22
Value error, Required field 'version' is not set and 'adopt-info' not used.
```

Snapcraft now requires an explicit `adopt-info` reference whenever the version is set inside an `override-build` step via `craftctl set version=...`. Pointing it at the existing `git-sweep` part satisfies the validator without changing how the version is computed.

Test plan

  • The `snapcraft` job on this PR runs (because `snap/**` and the workflow file are touched) and reaches at least the `Build snap` step without a schema error.
  • After merge, `gh workflow run snapcraft.yml --ref main` runs cleanly.
  • On the next `vX.Y.Z` tag push, the `Upload to Snap Store` step fires (gated on `refs/tags/v*`).

Three related changes that let us debug snap-store packaging without
having to push a real release tag.

1. Workflow triggers
   - Add workflow_dispatch so the workflow can be run manually
     against any branch via the GitHub UI or `gh workflow run`.
   - Add pull_request trigger filtered to snap/** and the workflow
     file itself, so PRs that touch the snap config get automatic
     build feedback.
   - Tag-push trigger remains; snap-store upload is now gated on
     refs/tags/v* so PR and dispatch builds stop at the build step.
   - SNAP_VERSION falls back to 0.0.0-dev for non-tag runs so the
     overlaid version string stays valid.

2. snap/snapcraft.yaml: add `adopt-info: git-sweep`
   The previous v0.1.1 build run failed schema validation:

       has-base.core22
         Value error, Required field 'version' is not set and
         'adopt-info' not used.

   Snapcraft now requires an explicit adopt-info reference whenever
   the version is set inside an override-build via `craftctl set
   version=...`. Pointing it at the existing git-sweep part satisfies
   the validator without changing how the version is computed.
@jmelosegui

Copy link
Copy Markdown
Owner Author

Superseded -- removing snap distribution entirely instead of fixing it. The script-based install on Linux is sufficient for now and a snap was not pulling its weight.

@jmelosegui jmelosegui closed this Apr 27, 2026
@jmelosegui
jmelosegui deleted the ci/snap-iterable branch April 27, 2026 02:34
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