Skip to content

Commit d18fa0a

Browse files
authored
ci: change snapcraft config (#373)
1 parent 31e6685 commit d18fa0a

2 files changed

Lines changed: 33 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,21 @@ jobs:
5252
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
5353

5454
snapcraft:
55-
runs-on: ubuntu-latest
55+
runs-on: ${{ matrix.runner }}
5656
needs: goreleaser
57+
strategy:
58+
matrix:
59+
include:
60+
- arch: amd64
61+
runner: ubuntu-latest
62+
- arch: arm64
63+
runner: ubuntu-24.04-arm
5764
steps:
5865
- name: Checkout
5966
uses: actions/checkout@v6
6067
with:
6168
fetch-depth: 0
6269

63-
- name: Set up Go
64-
uses: actions/setup-go@v6
65-
with:
66-
go-version: "1.26.1"
67-
6870
- name: Install Snapcraft and LXD
6971
run: |
7072
sudo snap install snapcraft --classic
@@ -73,9 +75,10 @@ jobs:
7375
sudo iptables -P FORWARD ACCEPT
7476
sudo usermod -aG lxd $USER
7577
76-
- name: Build and publish snap
78+
- name: Build snap
79+
run: sg lxd -c 'snapcraft pack --use-lxd --build-for=${{ matrix.arch }}'
80+
81+
- name: Upload snap
7782
env:
7883
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
79-
run: |
80-
sg lxd -c 'snapcraft pack'
81-
snapcraft upload --release=stable *.snap
84+
run: snapcraft upload --release=stable *.snap

snapcraft.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
name: matcha
2-
base: core22 # The base snap for a modern Ubuntu LTS
3-
version: "0.1" # This will be replaced by GoReleaser or can be set manually
2+
base: core22
3+
adopt-info: matcha
44
summary: A beautiful and functional email client for your terminal.
55
description: |
66
A beautiful and functional email client for your terminal, built with Go and the charming Bubble Tea TUI library.
77
Never leave your command line to check your inbox or send an email again!
88
9-
grade: stable # must be 'stable' to release into candidate, stable channels
10-
confinement: strict # use 'strict' confinement for security
9+
grade: stable
10+
confinement: strict
11+
architectures:
12+
- build-on: [amd64]
13+
build-for: [amd64]
14+
- build-on: [arm64]
15+
build-for: [arm64]
1116

1217
apps:
1318
matcha:
1419
command: bin/matcha
1520
plugs:
16-
- network # Required for network access
17-
- home # To access the user's home directory for config files
21+
- network
22+
- home
1823

1924
parts:
2025
matcha:
2126
plugin: go
2227
source: .
2328
build-snaps:
2429
- go/1.26/stable
30+
build-packages:
31+
- gcc
32+
- libc6-dev
33+
build-environment:
34+
- CGO_ENABLED: "1"
35+
override-pull: |
36+
craftctl default
37+
version="$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo 0.1)"
38+
craftctl set version="$version"

0 commit comments

Comments
 (0)