Skip to content

Commit

Permalink
Use a local release file and make all the interesting targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtw committed Apr 1, 2024
1 parent 9874734 commit 9c84351
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jobs:
with:
release-type: program
release-main-package: ./cmd/xmidt-agent
release-custom-file: true
secrets: inherit
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ internal/adapters/libparodus/cmd/example/example
*.yml

.storage

dist/*

cmd/xmidt-agent/dist/*
110 changes: 110 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0
---
project_name: xmidt-agent


changelog:
use: github
sort: asc
filters:
exclude:
- '^test:'
- '^chore'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: 'Dependency Updates'
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 300
- title: 'New Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Bug Fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: 'Documentation Updates'
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other Work
order: 9999

sboms:
- id: archive
artifacts: archive
- id: binary
artifacts: binary
- id: source
artifacts: source

builds:
-
main: './cmd/xmidt-agent'
env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
goarch:
- "386"
- amd64
- arm
- arm64
- mips
- mips64
- mips64le
- mipsle
goarm:
- "5"
- "6"
- "7"
ldflags:
- -s -w
mod_timestamp: "{{ .CommitTimestamp }}"

archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'

source:
enabled: true
name_template: '{{ .ProjectName }}_{{ .Version }}_src'
format: 'tar.gz'

checksum:
name_template: '{{.ProjectName}}-{{.Version}}-checksums.txt'
algorithm: sha512

release:
extra_files:
- glob: ./.extra_files/**

dockers:
- use: buildx
goos: linux
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.url=https://github.com/xmidt-org/xmidt-agent"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.source=https://github.com/xmidt-org/xmidt-agent"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- ghcr.io/xmidt-org/xmidt-agent:{{ .Tag }}-amd64
- ghcr.io/xmidt-org/xmidt-agent:v{{ .Major }}-amd64
- ghcr.io/xmidt-org/xmidt-agent:v{{ .Major }}.{{ .Minor }}-amd64
- ghcr.io/xmidt-org/xmidt-agent:latest-amd64
dockerfile: 'Dockerfile'
extra_files:
- .release/docker
- LICENSE
- NOTICE

0 comments on commit 9c84351

Please sign in to comment.