Skip to content

Commit

Permalink
build: update releaser
Browse files Browse the repository at this point in the history
Signed-off-by: francesco-racciatti <[email protected]>
  • Loading branch information
francesco-racciatti committed Nov 24, 2023
1 parent 58acb3f commit 038ca13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Release Kilt
name: Release agent-kilt runtimes

on:
push:
tags:
- 'v*'


jobs:
release:
name: Release
Expand All @@ -16,14 +15,16 @@ jobs:
with:
go-version: ^1.18
id: go

- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 10 additions & 19 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
version: 1

before:
hooks:
- make -C runtimes/cloudformation clean kilt.zip
- make -C installer deps
- go install github.com/markbates/pkger/cmd/pkger@latest
- go generate installer/generate.go
- make -C runtimes/cloudformation clean agent-kilt.zip

builds:
- env:
- CGO_ENABLED=0
main: ./cmd/kilt-installer
dir: installer
binary: kilt
goos:
- linux
- windows
- darwin

archives:
- replacements:
darwin: macos
linux: linux
windows: windows
386: x86
amd64: x86_64
name_template: "kilt-installer-{{ .Os }}-{{ .Arch }}"
format: binary
- format: zip
name_template: "agent-kilt-{{ .Os }}-{{ .Arch }}"

release:
extra_files:
- glob: ./runtimes/cloudformation/kilt.zip

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
10 changes: 4 additions & 6 deletions runtimes/cloudformation/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
kilt.zip: cmd/handler/handler
cd cmd/handler/ && zip ../../kilt.zip ./handler
agent-kilt.zip: cmd/handler/handler
cd cmd/handler/ && zip ../../agent-kilt.zip ./handler

cmd/handler/handler:
cd cmd/handler && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build .

clean:
rm kilt.zip || true
rm agent-kilt.zip || true
rm cmd/handler/handler || true
rm ../../kilt.zip || true


.PHONY: clean
.PHONY: clean

0 comments on commit 038ca13

Please sign in to comment.