Skip to content

Commit

Permalink
Release v0.1.0 #minor
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees committed Sep 26, 2024
1 parent 19bea72 commit 4c8ed2c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
echo "${DOCKER_PASSWORD}" | docker login ghcr.io --username "${DOCKER_USERNAME}" --password-stdin
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: 1.26.2
Expand Down
95 changes: 19 additions & 76 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,92 +5,35 @@ builds:
- main: ./cmd/webhook
env:
- CGO_ENABLED=0
flags:
- -trimpath #removes all file system paths from the compiled executable

goos:
- linux
- windows
- darwin

goarch:
- amd64
- arm64

ldflags:
- -X 'main.Version={{.Version}}'
- -X 'main.Gitsha={{.ShortCommit}}'
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
dockers:
- id: external-dns-vultr-webhook-amd64
use: buildx
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
goos: linux
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description=vultr DNS webhook for external-dns
- --label=org.opencontainers.image.url=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.source=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- id: external-dns-vultr-webhook-arm64
use: buildx
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
goos: linux
goarch: arm64
build_flag_templates:
- --platform=linux/arm64/v8
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description=vultr DNS webhook for external-dns
- --label=org.opencontainers.image.url=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.source=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
docker_manifests:
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .ShortCommit }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"

checksum:
disable: false
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
name_template: "{{ .ProjectName }}_v{{ .Version }}_checksums.txt"
algorithm: sha256

snapshot:
version_template: "{{ incpatch .Version }}-next"
name_template: "{{ .ProjectName }}_v{{ .Version }}"

changelog:
use: github
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

dockers:
- dockerfile: Dockerfile
image_templates:
- "vultr/external-dns-vultr-webhook:latest"
- "vultr/external-dns-vultr-webhook:{{ .Tag }}"

release:
github:
owner: Vultr
name: external-dns-vultr-webhook

0 comments on commit 4c8ed2c

Please sign in to comment.