Skip to content

Commit 61553c4

Browse files
authored
chore: add snap to release packages (go-acme#2134)
1 parent 441775e commit 61553c4

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ jobs:
5353
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
5454
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
5555

56+
- name: Install snapcraft
57+
run: sudo snap install snapcraft --classic
58+
59+
- name: Snapcraft login
60+
env:
61+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
62+
run: snapcraft login
63+
5664
- name: Set up QEMU
5765
uses: docker/setup-qemu-action@v3
5866

.goreleaser.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,31 @@ dockers:
141141
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
142142
- '--label=org.opencontainers.image.version={{.Version}}'
143143
- '--platform=linux/arm/v7'
144+
145+
snapcrafts:
146+
- name: lego
147+
grade: stable
148+
confinement: strict
149+
license: MIT
150+
base: core22
151+
publish: true
152+
summary: Lego is a Let's Encrypt/ACME client.
153+
description: |
154+
Lego is a Let's Encrypt/ACME client written in Go.
155+
156+
The lego snap makes it easy to install and use Lego on any Linux distribution that supports snaps.
157+
158+
Usage:
159+
* `sudo snap install lego`
160+
* `sudo lego --email="[email protected]" --domains="example.com" --server=https://acme-staging-v02.api.letsencrypt.org/directory --http --http.port :8080 run
161+
162+
channel_templates:
163+
- edge
164+
165+
apps:
166+
lego:
167+
command: bin/lego
168+
environment:
169+
LEGO_PATH: /var/snap/lego/common/.lego
170+
plugs:
171+
- network-bind

docs/content/installation/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ docker run goacme/lego -h
3030
yay -S lego-bin
3131
```
3232

33+
- [Snap](https://snapcraft.io/lego) (official):
34+
35+
```bash
36+
sudo snap install lego
37+
```
38+
3339
- [FreeBSD (Ports)](https://www.freshports.org/security/lego) (unofficial):
3440

3541
```bash

0 commit comments

Comments
 (0)