Skip to content

Commit

Permalink
chore: enable goreleaser gomod proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Penner <me@matthewp.io>
  • Loading branch information
matthewpi committed May 20, 2024
1 parent 6e5f7bf commit 1c055aa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
watch_file .nix/protoc-gen-connect-go.nix
watch_file .nix/protoc-gen-go-patch.nix
use flake
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ jobs:
upload-assets: true
# Use the existing release created by Goreleaser instead of creating another.
upload-tag-name: "${{ needs.goreleaser.outputs.tag_name }}"
# Ensure the release is a draft and doesn't create a new release that is published.
draft-release: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ go.work
*.swp
*.swo
*~

# goreleaser
dist
21 changes: 16 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ version: 1
before:
hooks:
- go mod tidy
- /bin/bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'
- bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'

metadata:
mod_timestamp: "{{ .CommitTimestamp }}"

gomod:
proxy: true

report_sizes: true

builds:
Expand All @@ -33,18 +36,26 @@ kos:
tags:
- '{{.Tag}}'
# TODO: find a way to set the latest package tag, only when the release gets published on GitHub.
# we can trigger an action on release_published, but we then need to write a system that "pushes"
# We can trigger an action on release_published, but we then need to write a system that "pushes"
# the `latest` manifest.
- '{{ if not .Prerelease }}latest{{ end }}'
creation_time: '{{.CommitTimestamp}}'
ko_data_creation_time: '{{.CommitTimestamp}}'
creation_time: '{{ .CommitTimestamp }}'
ko_data_creation_time: '{{ .CommitTimestamp }}'
sbom: 'spdx'
bare: true
preserve_import_paths: false
labels:
org.opencontainers.image.description: "Kubernetes Gateway API implementation powered by Caddy"
org.opencontainers.image.licenses: Apache-2.0"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.name: "{{ .ProjectName }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.source: "{{ .GitURL }}"
org.opencontainers.image.version: "{{ .Version }}"

checksum:
algorithm: sha256
name_template: "CHECKSUMS.txt"
name_template: "checksums.txt"

sboms:
- artifacts: binary
Expand Down

0 comments on commit 1c055aa

Please sign in to comment.