feat: initial snap packaging support (#418)

Signed-off-by: Jon Seager <jon@sgrs.uk>
This commit is contained in:
Jon Seager 2023-09-25 12:03:34 +01:00 committed by GitHub
parent 0930a90822
commit 91ced8c2c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View File

@ -50,6 +50,17 @@ jobs:
with:
cosign-release: v2.2.0
- name: Setup snapcraft
run: |
sudo snap install snapcraft --classic --channel=7.x/stable
snapcraft login
# See https://github.com/goreleaser/goreleaser/issues/1715
mkdir -p "$HOME/.cache/snapcraft/download"
mkdir -p "$HOME/.cache/snapcraft/stage-packages"
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:

View File

@ -179,6 +179,22 @@ nfpms:
file_info:
mode: 0444
snapcrafts:
- name: opentofu
publish: true
summary: OpenTofu lets you declaratively manage your cloud infrastructure.
description: |
OpenTofu is an OSS tool for building, changing, and versioning infrastructure
safely and efficiently. OpenTofu can manage existing and popular service
providers as well as custom in-house solutions.
base: core22
grade: stable
confinement: classic
license: MPL-2.0
apps:
tofu:
command: tofu
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"