Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

6.0 KB
Raw Blame
version: 2

snapshot:
  version_template: "{{ .Env.LISTMONK_VERSION }}"

# GoReleaser config for nightly builds

env:
  - GO111MODULE=on
  - CGO_ENABLED=0
  - GITHUB_ORG=knadh
  - DOCKER_ORG=listmonk

before:
  hooks:
    - make build-frontend

builds:
  - binary: listmonk
    main: ./cmd
    goos:
      - linux
      - windows
      - darwin
      - freebsd
      - openbsd
      - netbsd
    goarch:
      - amd64
      - arm64
      - arm
    goarm:
      - 6
      - 7
    ignore:
      - goos: windows
        goarch: arm
    ldflags:
      - -s -w -X "main.buildString=nightly ({{ .ShortCommit }} {{ .Date }}, {{ .Os }}/{{ .Arch }})" -X "main.versionString={{ .Env.LISTMONK_VERSION }}"

    hooks:
      # stuff executables with static assets.
      post: make pack-bin BIN={{ .Path }}

archives:
  - formats: [tar.gz]
    name_template: "listmonk_nightly_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    files:
      - README.md
      - LICENSE

dockers:
  - use: buildx
    goos: linux
    goarch: amd64
    ids:
      - listmonk
    image_templates:
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-amd64"
      - "ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-amd64"
    build_flag_templates:
      - --platform=linux/amd64
      - --label=org.opencontainers.image.title={{ .ProjectName }}
      - --label=org.opencontainers.image.description={{ .ProjectName }}
      - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.version=nightly
      - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
      - --label=org.opencontainers.image.revision={{ .FullCommit }}
      - --label=org.opencontainers.image.licenses=AGPL-3.0
    dockerfile: Dockerfile
    extra_files:
      - config.toml.sample
      - docker-entrypoint.sh
  - use: buildx
    goos: linux
    goarch: arm64
    ids:
      - listmonk
    image_templates:
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-arm64v8"
      - "ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-arm64v8"
    build_flag_templates:
      - --platform=linux/arm64/v8
      - --label=org.opencontainers.image.title={{ .ProjectName }}
      - --label=org.opencontainers.image.description={{ .ProjectName }}
      - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.version=nightly
      - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
      - --label=org.opencontainers.image.revision={{ .FullCommit }}
      - --label=org.opencontainers.image.licenses=AGPL-3.0
    dockerfile: Dockerfile
    extra_files:
      - config.toml.sample
      - docker-entrypoint.sh
  - use: buildx
    goos: linux
    goarch: arm
    goarm: 6
    ids:
      - listmonk
    image_templates:
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-armv6"
      - "ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-armv6"
    build_flag_templates:
      - --platform=linux/arm/v6
      - --label=org.opencontainers.image.title={{ .ProjectName }}
      - --label=org.opencontainers.image.description={{ .ProjectName }}
      - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.version=nightly
      - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
      - --label=org.opencontainers.image.revision={{ .FullCommit }}
      - --label=org.opencontainers.image.licenses=AGPL-3.0
    dockerfile: Dockerfile
    extra_files:
      - config.toml.sample
      - docker-entrypoint.sh
  - use: buildx
    goos: linux
    goarch: arm
    goarm: 7
    ids:
      - listmonk
    image_templates:
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-armv7"
      - "ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-armv7"
    build_flag_templates:
      - --platform=linux/arm/v7
      - --label=org.opencontainers.image.title={{ .ProjectName }}
      - --label=org.opencontainers.image.description={{ .ProjectName }}
      - --label=org.opencontainers.image.url=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}
      - --label=org.opencontainers.image.version=nightly
      - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
      - --label=org.opencontainers.image.revision={{ .FullCommit }}
      - --label=org.opencontainers.image.licenses=AGPL-3.0
    dockerfile: Dockerfile
    extra_files:
      - config.toml.sample
      - docker-entrypoint.sh

docker_manifests:
  - name_template: "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly"
    image_templates:
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-amd64"
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-arm64v8"
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-armv6"
      - "{{ .Env.DOCKER_ORG }}/{{ .ProjectName }}:nightly-armv7"
  - name_template: ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly
    image_templates:
      - ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-amd64
      - ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-arm64v8
      - ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-armv6
      - ghcr.io/{{ .Env.GITHUB_ORG }}/{{ .ProjectName }}:nightly-armv7

changelog:
  disable: true

release:
  prerelease: true
  name_template: "Nightly Build"
  header: |
    ## Nightly Build

    > **Warning**: This is an automated nightly build from the master branch.
    > It may contain bugs and breaking changes. Use at your own risk.
    > For stable releases, please use a versioned release.

    Built from commit: {{ .ShortCommit }}