|
| 1 | +project_name: thing-controller |
| 2 | +env: |
| 3 | + - REPOSITORY_OWNER={{ if index .Env "REPOSITORY_OWNER" }}{{ .Env.REPOSITORY_OWNER }}{{ else }}local{{ end }} |
| 4 | + - GC_FLAGS={{ if index .Env "DEBUG" }}all=-N -l{{ else }}-c 1{{ end }} |
| 5 | + - REMOVE_DEBUG_SYMBOLS={{ if index .Env "DEBUG" }}{{ else }}-w{{ end }} |
| 6 | +builds: |
| 7 | + - env: |
| 8 | + - CGO_ENABLED=0 |
| 9 | + goos: |
| 10 | + - linux |
| 11 | + - windows |
| 12 | + - darwin |
| 13 | + goarch: |
| 14 | + - amd64 |
| 15 | + - arm |
| 16 | + - arm64 |
| 17 | + - 386 |
| 18 | + goarm: |
| 19 | + - 6 |
| 20 | + - 7 |
| 21 | + ldflags: |
| 22 | + - -s {{ .Env.REMOVE_DEBUG_SYMBOLS }} -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser |
| 23 | + gcflags: |
| 24 | + - '{{ .Env.GC_FLAGS }}' |
| 25 | +# probably won't be used |
| 26 | +archives: |
| 27 | + - replacements: |
| 28 | + darwin: Darwin |
| 29 | + linux: Linux |
| 30 | + windows: Windows |
| 31 | + 386: i386 |
| 32 | + amd64: x86_64 |
| 33 | +dockers: |
| 34 | + - image_templates: |
| 35 | + - "{{ .Env.REPOSITORY_OWNER }}io/{{ .ProjectName }}:v{{ .Version }}-amd64" |
| 36 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-amd64" |
| 37 | + dockerfile: Dockerfile |
| 38 | + use: buildx |
| 39 | + build_flag_templates: |
| 40 | + - --platform=linux/amd64 |
| 41 | + - --label=org.opencontainers.image.title={{ .ProjectName }} |
| 42 | + - --label=org.opencontainers.image.description={{ .ProjectName }} |
| 43 | + - --label=org.opencontainers.image.url=https://github.com/metacontroller/{{ .ProjectName }} |
| 44 | + - --label=org.opencontainers.image.source=https://github.com/metacontroller/{{ .ProjectName }} |
| 45 | + - --label=org.opencontainers.image.version=v{{ .Version }} |
| 46 | + - --label=org.opencontainers.image.created={{ .Date }} |
| 47 | + - --label=org.opencontainers.image.revision={{ .FullCommit }} |
| 48 | + - --label=org.opencontainers.image.licenses=Apache-2.0 |
| 49 | + - image_templates: |
| 50 | + - "{{ .Env.REPOSITORY_OWNER }}io/{{ .ProjectName }}:v{{ .Version }}-arm64v8" |
| 51 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-arm64v8" |
| 52 | + goarch: arm64 |
| 53 | + dockerfile: Dockerfile |
| 54 | + use: buildx |
| 55 | + build_flag_templates: |
| 56 | + - --platform=linux/arm64/v8 |
| 57 | + - --label=org.opencontainers.image.title={{ .ProjectName }} |
| 58 | + - --label=org.opencontainers.image.description={{ .ProjectName }} |
| 59 | + - --label=org.opencontainers.image.url=https://github.com/metacontroller/{{ .ProjectName }} |
| 60 | + - --label=org.opencontainers.image.source=https://github.com/metacontroller/{{ .ProjectName }} |
| 61 | + - --label=org.opencontainers.image.version=v{{ .Version }} |
| 62 | + - --label=org.opencontainers.image.created={{ .Date }} |
| 63 | + - --label=org.opencontainers.image.revision={{ .FullCommit }} |
| 64 | + - --label=org.opencontainers.image.licenses=Apache-2.0 |
| 65 | + - image_templates: |
| 66 | + - "{{ .Env.REPOSITORY_OWNER }}io/{{ .ProjectName }}:v{{ .Version }}-armv7" |
| 67 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-armv7" |
| 68 | + goarch: arm64 |
| 69 | + dockerfile: Dockerfile |
| 70 | + use: buildx |
| 71 | + build_flag_templates: |
| 72 | + - --platform=linux/arm/v7 |
| 73 | + - --label=org.opencontainers.image.title={{ .ProjectName }} |
| 74 | + - --label=org.opencontainers.image.description={{ .ProjectName }} |
| 75 | + - --label=org.opencontainers.image.url=https://github.com/metacontroller/{{ .ProjectName }} |
| 76 | + - --label=org.opencontainers.image.source=https://github.com/metacontroller/{{ .ProjectName }} |
| 77 | + - --label=org.opencontainers.image.version=v{{ .Version }} |
| 78 | + - --label=org.opencontainers.image.created={{ .Date }} |
| 79 | + - --label=org.opencontainers.image.revision={{ .FullCommit }} |
| 80 | + - --label=org.opencontainers.image.licenses=Apache-2.0 |
| 81 | +docker_manifests: |
| 82 | + - name_template: ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }} |
| 83 | + skip_push: "false" |
| 84 | + image_templates: |
| 85 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-amd64" |
| 86 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-arm64v8" |
| 87 | + - "ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-armv7" |
| 88 | + - name_template: ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:latest |
| 89 | + skip_push: "false" |
| 90 | + image_templates: |
| 91 | + - ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-amd64 |
| 92 | + - ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-arm64v8 |
| 93 | + - ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}-armv7 |
| 94 | +checksum: |
| 95 | + name_template: 'checksums.txt' |
| 96 | +snapshot: |
| 97 | + name_template: "{{ incpatch .Version }}-next" |
| 98 | +release: |
| 99 | + mode: append |
| 100 | + footer: | |
| 101 | + ## Docker Images |
| 102 | + ### Github container registry |
| 103 | + - `ghcr.io/{{ .Env.REPOSITORY_OWNER }}/{{ .ProjectName }}:v{{ .Version }}` |
0 commit comments