1project_name: smoothie
 2
 3env:
 4  - GO111MODULE=on
 5  - CGO_ENABLED=0
 6
 7before:
 8  hooks:
 9    - go mod download
10
11builds:
12  - id: "smoothie"
13    binary: "smoothie"
14    ldflags: -s -w -X main.Version={{ .Commit }}-snapshot -X main.CommitSHA={{ .Commit }}
15    goos:
16      - linux
17    goarch:
18      - amd64
19
20dockers:
21  - image_templates:
22      - "ghcr.io/charmbracelet/smoothie:snapshot"
23      - "ghcr.io/charmbracelet/smoothie:{{ .Commit }}-snapshot"
24    ids: [smoothie]
25    goarch: amd64
26    build_flag_templates:
27      - --platform=linux/amd64
28      - --label=org.opencontainers.image.title={{ .ProjectName }}
29      - --label=org.opencontainers.image.description={{ .ProjectName }}
30      - --label=org.opencontainers.image.url=https://github.com/charmbracelet/smoothie
31      - --label=org.opencontainers.image.source=https://github.com/charmbracelet/smoothie
32      - --label=org.opencontainers.image.version={{ .Commit }}-snapshot
33      - --label=org.opencontainers.image.created={{ .Date }}
34      - --label=org.opencontainers.image.revision={{ .FullCommit }}
35      - --label=org.opencontainers.image.licenses=MIT
36    dockerfile: Dockerfile
37    use: buildx