diff --git a/.github/workflows/test-snap-can-build.yml b/.github/workflows/test-snap-can-build.yml
new file mode 100644
index 000000000..3796e95ed
--- /dev/null
+++ b/.github/workflows/test-snap-can-build.yml
@@ -0,0 +1,28 @@
+name: 🧪 Snap Builds
+
+on:
+ push:
+ branches: '*'
+ pull_request:
+ branches: '*'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [20.x]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: snapcore/action-build@v1
+ id: build
+
+ - uses: diddlesnaps/snapcraft-review-action@v1
+ with:
+ snap: ${{ steps.build.outputs.snap }}
+ isClassic: 'false'
+ # Plugs and Slots declarations to override default denial (requires store assertion to publish)
+ # plugs: ./plug-declaration.json
+ # slots: ./slot-declaration.json
diff --git a/README.md b/README.md
index b9c7a7cab..d8f4490d1 100644
--- a/README.md
+++ b/README.md
@@ -46,9 +46,7 @@ key-value-pair data in a variety of data formats.
* [Active issues](https://github.com/johnkerl/miller/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
# Installing
-
There's a good chance you can get Miller pre-built for your system:
-
[](https://launchpad.net/ubuntu/+source/miller)
[](https://launchpad.net/ubuntu/xenial/+package/miller)
[](https://packages.fedoraproject.org/pkgs/miller/miller/)
@@ -62,6 +60,9 @@ There's a good chance you can get Miller pre-built for your system:
[](https://www.freshports.org/textproc/miller/)
[](https://anaconda.org/conda-forge/miller/)
+
+[](https://snapcraft.io/)
+
[](https://formulae.brew.sh/formula/miller)
[](https://www.macports.org/ports.php?by=name&substr=miller)
[](https://chocolatey.org/packages/miller)
@@ -69,7 +70,7 @@ There's a good chance you can get Miller pre-built for your system:
|OS|Installation command|
|---|---|
-|Linux|`yum install miller`
`apt-get install miller`|
+|Linux|`yum install miller`
`apt-get install miller`
`snap install miller`|
|Mac|`brew install miller`
`port install miller`|
|Windows|`choco install miller`
`winget install Miller.Miller`
`scoop install main/miller`|
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
new file mode 100644
index 000000000..c88b8adc1
--- /dev/null
+++ b/snap/snapcraft.yaml
@@ -0,0 +1,50 @@
+name: miller
+adopt-info: miller
+summary: Miller is like awk, sed, cut, join and sort
+description: |
+ Miller is like awk, sed, cut, join, and sort for data formats such as CSV, TSV, JSON, JSON Lines, and positionally-indexed.
+
+contact: https://github.com/johnkerl/miller/issues
+issues: https://github.com/johnkerl/miller/issues
+source-code: https://github.com/johnkerl/miller
+
+license: BSD-2-Clause
+base: core24
+grade: stable
+confinement: strict
+compression: lzo
+
+platforms:
+ amd64:
+ build-on: [amd64]
+ build-for: [amd64]
+ arm64:
+ build-on: [arm64]
+ build-for: [arm64]
+ armhf:
+ build-on: [armhf]
+ build-for: [armhf]
+ s390x:
+ build-on: [s390x]
+ build-for: [s390x]
+ ppc64el:
+ build-on: [ppc64el]
+ build-for: [ppc64el]
+
+apps:
+ miller:
+ command: usr/local/bin/mlr
+ plugs:
+ - home
+
+parts:
+ miller:
+ source: https://github.com/johnkerl/miller
+ source-type: git
+ plugin: make
+ build-snaps:
+ - go
+
+ override-pull: |
+ craftctl default
+ craftctl set version="$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"