Skip to content

Commit

Permalink
Add goreleaser & helm-charts as release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
mallardduck committed Oct 5, 2024
1 parent 7be6bf5 commit 24dd89e
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name : Build, test & validate
run : BUILD_TARGET=helm-locker make ci
- name : Package release helm charts
run : make package-helm
- run: mkdir -p ./build/artifacts/ && mv -v ./dist/artifacts/ ./build/
- name: Extract metadata (tags, labels) for helm-locker image
id: meta-locker
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -63,4 +66,12 @@ jobs:
push: true
tags: ${{ steps.meta-hpo.outputs.tags }}
labels: ${{ steps.meta-hpo.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
63 changes: 63 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Make sure to check the documentation at https://goreleaser.com
version: 2 # the goreleaser config version
before:
hooks:
- go mod tidy
builds:
- id: helm-locker
main: ./cmd/helm-locker/main.go
goos:
- linux
goarch:
- amd64
- arm64
binary: helm-locker
ldflags:
- -extldflags
- -static
- -s
- -X main.Version={{.Version}} -X main.GitCommit={{.Commit}}
flags:
- -trimpath
env:
- CGO_ENABLED=0
- id: helm-project-operator
main: ./cmd/helm-project-operator/main.go
goos:
- linux
goarch:
- amd64
- arm64
binary: helm-project-operator
ldflags:
- -extldflags
- -static
- -s
- -X main.Version={{.Version}} -X main.GitCommit={{.Commit}}
flags:
- -trimpath
env:
- CGO_ENABLED=0
archives:
- id: helm-project-operator
builds:
- helm-project-operator
name_template: '{{ .Binary }}-{{ .Arch }}'
- id: helm-locker
builds:
- helm-locker
name_template: '{{ .Binary }}-{{ .Arch }}'
release:
prerelease: auto
extra_files:
- glob : ./build/artifacts/*.tgz
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 24dd89e

Please sign in to comment.