Skip to content

Commit 9123b3e

Browse files
authored
fix goreleaser artifact for linux arm build (#242)
* fix linux arm release * add discord notifications of releases * fix race condition in post hook * experiment with different sbom settings
1 parent f8912f1 commit 9123b3e

2 files changed

Lines changed: 35 additions & 6 deletions

File tree

.goreleaser.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,40 @@ builds:
1111
- windows_amd64
1212
binary: deleterious
1313
hooks:
14-
post: ./goreleaser-post-hook.sh
14+
post:
15+
- cmd: ./goreleaser-post-hook.sh
16+
env:
17+
- BUILD_TARGET={{ .Target }}
18+
- ARTIFACT={{ .Path }}
19+
1520

1621
checksum:
1722
name_template: 'checksums.txt'
1823

1924
sboms:
20-
- artifacts: archive
25+
- artifacts: source
26+
27+
announce:
28+
discord:
29+
# Whether its enabled or not.
30+
# Defaults to false.
31+
enabled: true
32+
33+
# Message template to use while publishing.
34+
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
35+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }} or brew upgrade {{ .ProjectName }}'
36+
37+
# Set author of the embed.
38+
# Defaults to `GoReleaser`
39+
author: 'GoReleaser'
40+
41+
# Color code of the embed. You have to use decimal numeral system, not hexadecimal.
42+
# Defaults to `3888754` - the grey-ish from goreleaser
43+
color: ''
44+
45+
# URL to an image to use as the icon for the embed.
46+
# Defaults to `https://goreleaser.com/static/avatar.png`
47+
icon_url: ''
2148

2249
brews:
2350
- # Repository to push the tap to.

goreleaser-post-hook.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ echo "moving bazel outputs to goreleaser dist directory for packaging..."
55
mkdir -p dist/deleterious_darwin_amd64
66
mkdir -p dist/deleterious_darwin_arm64
77
mkdir -p dist/deleterious_linux_amd64
8+
mkdir -p dist/deleterious_linux_arm64
89
mkdir -p dist/deleterious_windows_amd64
910

10-
sudo cp bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious
11-
sudo cp bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious
12-
sudo cp bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious
13-
sudo cp bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe
11+
sudo cp -f bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious
12+
sudo cp -f bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious
13+
sudo cp -f bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious
14+
sudo cp -f bdist/deleterious-linux-arm dist/deleterious_linux_arm64/deleterious
15+
sudo cp -f bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe

0 commit comments

Comments
 (0)