|
| 1 | +# This is an example .goreleaser.yml file with some sensible defaults. |
| 2 | +# Make sure to check the documentation at https://goreleaser.com |
| 3 | + |
| 4 | +# The lines below are called `modelines`. See `:help modeline` |
| 5 | +# Feel free to remove those if you don't want/need to use them. |
| 6 | +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json |
| 7 | +# vim: set ts=2 sw=2 tw=0 fo=cnqoj |
| 8 | + |
| 9 | +version: 2 |
| 10 | + |
| 11 | +project_name: example |
| 12 | + |
| 13 | +builds: |
| 14 | + - builder: deno |
| 15 | + targets: |
| 16 | + - x86_64-pc-windows-msvc |
| 17 | + - x86_64-apple-darwin |
| 18 | + - aarch64-apple-darwin |
| 19 | + - x86_64-unknown-linux-gnu |
| 20 | + - aarch64-unknown-linux-gnu |
| 21 | + |
| 22 | +archives: |
| 23 | + - format: tar.gz |
| 24 | + # this name template makes the OS and Arch compatible with the results of `uname`. |
| 25 | + name_template: >- |
| 26 | + {{ .ProjectName }}_ |
| 27 | + {{- title .Os }}_ |
| 28 | + {{- if eq .Arch "amd64" }}x86_64 |
| 29 | + {{- else if eq .Arch "386" }}i386 |
| 30 | + {{- else }}{{ .Arch }}{{ end }} |
| 31 | + # use zip for windows archives |
| 32 | + format_overrides: |
| 33 | + - goos: windows |
| 34 | + format: zip |
| 35 | + |
| 36 | +changelog: |
| 37 | + sort: asc |
| 38 | + filters: |
| 39 | + exclude: |
| 40 | + - "^docs:" |
| 41 | + - "^test:" |
| 42 | + |
| 43 | +release: |
| 44 | + footer: >- |
| 45 | +
|
| 46 | + --- |
| 47 | +
|
| 48 | + Released by [GoReleaser](https://github.com/goreleaser/goreleaser). |
| 49 | +
|
| 50 | +# Creates Linux packages. |
| 51 | +nfpms: |
| 52 | + - file_name_template: "{{ .ConventionalFileName }}" |
| 53 | + maintainer: Carlos Alexandro Becker <[email protected]> |
| 54 | + formats: |
| 55 | + - deb |
| 56 | + - apk |
| 57 | + - rpm |
| 58 | + |
| 59 | +# Creates Darwin universal binaries. |
| 60 | +universal_binaries: |
| 61 | + - replace: true |
| 62 | + |
| 63 | +# Enables source archives. |
| 64 | +source: |
| 65 | + enabled: true |
| 66 | + |
| 67 | +# SBOMs for the archives. |
| 68 | +sboms: |
| 69 | + - artifacts: archive |
| 70 | + |
| 71 | +# Create Docker images. |
| 72 | +# We create a manifest below, so here the images need the suffix with the |
| 73 | +# architecture. |
| 74 | +dockers: |
| 75 | + - image_templates: |
| 76 | + - "ghcr.io/goreleaser/example-deno:{{ .Tag }}-arm64" |
| 77 | + dockerfile: Dockerfile |
| 78 | + goarch: arm64 |
| 79 | + use: buildx |
| 80 | + build_flag_templates: |
| 81 | + - "--pull" |
| 82 | + - "--label=org.opencontainers.image.created={{.Date}}" |
| 83 | + - "--label=org.opencontainers.image.name={{.ProjectName}}" |
| 84 | + - "--label=org.opencontainers.image.revision={{.FullCommit}}" |
| 85 | + - "--label=org.opencontainers.image.version={{.Version}}" |
| 86 | + - "--label=org.opencontainers.image.source={{.GitURL}}" |
| 87 | + - "--platform=linux/arm64" |
| 88 | + - image_templates: |
| 89 | + - "ghcr.io/goreleaser/example-deno:{{ .Tag }}-amd64" |
| 90 | + dockerfile: Dockerfile |
| 91 | + goarch: amd64 |
| 92 | + use: buildx |
| 93 | + build_flag_templates: |
| 94 | + - "--pull" |
| 95 | + - "--label=org.opencontainers.image.created={{.Date}}" |
| 96 | + - "--label=org.opencontainers.image.name={{.ProjectName}}" |
| 97 | + - "--label=org.opencontainers.image.revision={{.FullCommit}}" |
| 98 | + - "--label=org.opencontainers.image.version={{.Version}}" |
| 99 | + - "--label=org.opencontainers.image.source={{.GitURL}}" |
| 100 | + - "--platform=linux/amd64" |
| 101 | + |
| 102 | +# Here we join both images into a Docker manifest. |
| 103 | +docker_manifests: |
| 104 | + - name_template: "ghcr.io/goreleaser/example-deno:{{ .Tag }}" |
| 105 | + image_templates: |
| 106 | + - "ghcr.io/goreleaser/example-deno:{{ .Tag }}-arm64" |
| 107 | + - "ghcr.io/goreleaser/example-deno:{{ .Tag }}-amd64" |
0 commit comments