Skip to content
Snippets Groups Projects
.goreleaser.yml 4.94 KiB
Newer Older
project_name: mytoken-server
before:
  hooks:
    - go mod tidy
Gabriel Zachmann's avatar
Gabriel Zachmann committed
dist: results
builds:
  - id: server
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    main: ./cmd/mytoken-server
    binary: mytoken-server
    env:
      - CGO_ENABLED=0
    goos:
      - linux
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    flags:
      - -trimpath
    mod_timestamp: '{{ .CommitTimestamp }}'
  - id: setup
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    main: ./cmd/mytoken-server/mytoken-setup
    binary: mytoken-setup
    env:
      - CGO_ENABLED=0
    goos:
      - linux
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    flags:
      - -trimpath
    mod_timestamp: '{{ .CommitTimestamp }}'
Gabriel Zachmann's avatar
Gabriel Zachmann committed
  - id: migratedb
    main: ./cmd/mytoken-server/mytoken-migratedb
    binary: mytoken-migratedb
    env:
      - CGO_ENABLED=0
    goos:
      - linux
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    flags:
      - -trimpath
    mod_timestamp: '{{ .CommitTimestamp }}'
archives:
Gabriel Zachmann's avatar
Gabriel Zachmann committed
  - replacements:
      darwin: macOS
      386: 32-bit
      amd64: 64-bit
    format_overrides:
      - goos: windows
        format: zip
nfpms:
  - id: server-pkg
    package_name: mytoken-server
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    replacements:
      386: i386
    file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
    builds:
      - server
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    homepage: https://mytoken-docs.data.kit.edu/server
    maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu>
    description: Mytoken is a central web service with the goal to easily obtain OpenID Connect access tokens across devices.
    license: MIT
    formats:
      - deb
      - rpm
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    release: "1"
    section: misc
    bindir: /usr/bin
    contents:
      - src: config/example-config.yaml
        dst: /etc/mytoken/example-config.yaml
        type: config
      - src: config/mytoken.service
        dst: /etc/systemd/system/mytoken.service
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - dst: /var/log/mytoken
        type: dir
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    overrides:
      rpm:
        replacements:
          amd64: x86_64
        file_name_template: "{{ .PackageName }}-{{ .Version }}.{{ .Arch }}"
  - id: setup-pkg
    package_name: mytoken-server-setup
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    replacements:
      386: i386
    file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
    builds:
      - setup
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    homepage: https://mytoken-docs.data.kit.edu/server
    maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu>
    description: A setup utility for the mytoken-server
    license: MIT
    formats:
      - deb
      - rpm
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    release: "1"
    section: misc
    bindir: /usr/bin
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    overrides:
      rpm:
        replacements:
          amd64: x86_64
        file_name_template: "{{ .PackageName }}-{{ .Version }}.{{ .Arch }}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
  - id: migratedb-pkg
    package_name: mytoken-server-migratedb
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    replacements:
      386: i386
    file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    builds:
      - migratedb
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    homepage: https://mytoken-docs.data.kit.edu/server
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu>
    description: A tool for migrating the database between versions
    license: MIT
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    dependencies:
      - mariadb-client
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    formats:
      - deb
      - rpm
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    release: "1"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    section: misc
    bindir: /usr/bin
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    overrides:
      rpm:
        replacements:
          amd64: x86_64
        file_name_template: "{{ .PackageName }}-{{ .Version }}.{{ .Arch }}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
dockers:
  - goos: linux
    goarch: amd64
    ids:
      - server
    image_templates:
      - "oidcmytoken/mytoken-server:unstable"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - "oidcmytoken/mytoken-server:{{ .Tag }}"
    dockerfile: cmd/mytoken-server/Dockerfile
    build_flag_templates:
      - "--pull"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title=mytoken-server"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
  - goos: linux
    goarch: amd64
    ids:
      - setup
    image_templates:
      - "oidcmytoken/mytoken-setup:unstable"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - "oidcmytoken/mytoken-setup:{{ .Tag }}"
    dockerfile: cmd/mytoken-server/mytoken-setup/Dockerfile
    build_flag_templates:
      - "--pull"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title=mytoken-setup"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - "--label=org.opencontainers.image.version={{.Version}}"
  - goos: linux
    goarch: amd64
    ids:
      - migratedb
    image_templates:
      - "oidcmytoken/mytoken-migratedb:unstable"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - "oidcmytoken/mytoken-migratedb:{{ .Tag }}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    dockerfile: cmd/mytoken-server/mytoken-migratedb/Dockerfile
Gabriel Zachmann's avatar
Gabriel Zachmann committed
    build_flag_templates:
      - "--pull"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title=mytoken-migratedb"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
Gabriel Zachmann's avatar
Gabriel Zachmann committed
      - "--label=org.opencontainers.image.version={{.Version}}"
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ .Tag }}-next"
  disable: true
  prerelease: auto
Gabriel Zachmann's avatar
Gabriel Zachmann committed
  draft: true
  github:
    owner: oidc-mytoken
    name: server
  name_template: "{{.ProjectName}} {{.Version}}"
changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'