feat: snapstore (#36)

drew created

Change summary

.github/workflows/release.yml |  1 +
.goreleaser.yml               | 27 +++------------------------
snapcraft.yml                 | 23 +++++++++++++++++++++++
3 files changed, 27 insertions(+), 24 deletions(-)

Detailed changes

.github/workflows/release.yml 🔗

@@ -46,3 +46,4 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
+          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

.goreleaser.yml 🔗

@@ -105,27 +105,6 @@ brews:
     # This tells Homebrew to just install the binary.
     install: |
       bin.install "email-cli"
-nfpms:
-  - # ID of the nfpm config, must be unique.
-    id: email-cli-btea
-    # Name of the package.
-    package_name: email-cli
-    # Version of the package.
-    # Defaults to the project's version.
-    version: "{{ .Version }}"
-    # Maintainer of the package.
-    maintainer: "Drew Smirnoff <me@andrinoff.com>"
-    # Description of the package.
-    description: "A beautiful and functional email client for your terminal."
-    # Homepage of the package.
-    homepage: "https://github.com/andrinoff/email-cli"
-    # License of the package.
-    license: MIT
-    # Formats to generate.
-    formats:
-      - deb # For apt
-      - rpm # For yum/dnf
-    # Files to include in the package.
-    contents:
-      - src: ./email-cli
-        dst: /usr/local/bin/email-cli
+snapcrafts:
+  - name: email-cli
+    publish: true

snapcraft.yml 🔗

@@ -0,0 +1,23 @@
+name: email-cli
+base: core22 # The base snap for a modern Ubuntu LTS
+version: "0.1" # This will be replaced by GoReleaser or can be set manually
+summary: A beautiful and functional email client for your terminal.
+description: |
+  A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
+  Never leave your command line to check your inbox or send an email again!
+
+grade: stable # must be 'stable' to release into candidate, stable channels
+confinement: strict # use 'strict' confinement for security
+
+apps:
+  email-cli:
+    command: bin/email-cli
+    plugs:
+      - network # Required for network access
+      - home # To access the user's home directory for config files
+
+parts:
+  email-cli:
+    plugin: go
+    source: .
+    go-importpath: github.com/andrinoff/email-cli