It’s the first hit that turns up when looking for “github actions”.
I just tried adding it to a random snap I manage, and it failed. Which makes me think either a) I need to read every single one of the 40 replies, or b) it’s outdated, or c) someone else superseded this with something else.
Call for testing: Github action for Snapcraft does link to the official actions. Those just haven’t been updated to the first post for some reason and can’t be easily found from the GitHub Marketplace either.
Try changing your workflow to call snapcore/action-build@v1 instead of the version in my repo. We ended up moving the action over to a repo not exclusively controlled by me.
There wasn’t a good way to redirect users of the original repo, so I didn’t delete the original.
It looks like the action itself is working fine, the build environment looks like it’s missing build-parts though.
make[1]: lzsa: No such file or directory
There’s a very few select packages that are implicit in the build for Multipass, but not LXD, Launchpad, etc. It’s possible lzsa might be something that’s default on one of these but not the rest, especially when the base snap is updated. (but in all my time here, I’ve only encountered one).
I’ve moved the snapcore/action-build@v1 tag to the new v1.3.0 release, and things seem to be stable.
The main purpose of this release was to fix some compatibility bugs with Github’s beta ubuntu-24.04 runner image. This should ensure that workflows using ubuntu-latest continue to function once that label starts pointing at the ubuntu-24.04 image.
And as a reminder: there is no need to match the Github runner image to your snap’s base, since Snapcraft will run the build within a clean LXD container. So even if you’re building a core24 snap, you aren’t required to use the ubuntu-24.04 image before Github decides to make it default.