Skip to content

Commit

Permalink
feat(i): Add telemetry release config (#3431)
Browse files Browse the repository at this point in the history
## Relevant issue(s)

Resolves #3430

## Description

This PR adds two new goreleaser configs for telemetry enabled builds.

It also bumps the goreleaser to `v2.6.1` and updates the deprecated
`format` field to `formats`

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

`goreleaser check`

Specify the platform(s) on which this was tested:
- MacOS
  • Loading branch information
nasdf authored Feb 7, 2025
1 parent 730eb15 commit 5536ee3
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: 2.3.2
version: 2.6.1
args: release --clean --split ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
48 changes: 46 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ builds:
goarch:
- amd64
- arm64
# A build with telemetry included.
- id: "defradb_telemetry"
main: ./cmd/defradb
flags:
- -tags=telemetry
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
# A build with the playground and telemetry included.
- id: "defradb_playground_telemetry"
main: ./cmd/defradb
flags:
- -tags=playground,telemetry
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64

partial:
by: target
Expand All @@ -35,7 +59,7 @@ archives:
- id: defradb_playground
builds:
- defradb_playground
format: binary
formats: [binary]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .Binary }}_playground_{{ .Version }}_{{ .Os }}_
Expand All @@ -45,13 +69,33 @@ archives:
- id: defradb
builds:
- defradb
format: binary
formats: [binary]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
- id: defradb_telemetry
builds:
- defradb_telemetry
formats: [binary]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .Binary }}_telemetry_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
- id: defradb_playground_telemetry
builds:
- defradb_playground_telemetry
formats: [binary]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .Binary }}_playground_telemetry_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
release:
target_commitish: '{{ .Commit }}'
Expand Down

0 comments on commit 5536ee3

Please sign in to comment.