Skip to content

Commit

Permalink
fix goreleaser artifact for linux arm build (#242)
Browse files Browse the repository at this point in the history
* fix linux arm release
* add discord notifications of releases
* fix race condition in post hook
* experiment with different sbom settings
  • Loading branch information
statik authored Dec 22, 2021
1 parent f8912f1 commit 9123b3e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
31 changes: 29 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,40 @@ builds:
- windows_amd64
binary: deleterious
hooks:
post: ./goreleaser-post-hook.sh
post:
- cmd: ./goreleaser-post-hook.sh
env:
- BUILD_TARGET={{ .Target }}
- ARTIFACT={{ .Path }}


checksum:
name_template: 'checksums.txt'

sboms:
- artifacts: archive
- artifacts: source

announce:
discord:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }} or brew upgrade {{ .ProjectName }}'

# Set author of the embed.
# Defaults to `GoReleaser`
author: 'GoReleaser'

# Color code of the embed. You have to use decimal numeral system, not hexadecimal.
# Defaults to `3888754` - the grey-ish from goreleaser
color: ''

# URL to an image to use as the icon for the embed.
# Defaults to `https://goreleaser.com/static/avatar.png`
icon_url: ''

brews:
- # Repository to push the tap to.
Expand Down
10 changes: 6 additions & 4 deletions goreleaser-post-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ echo "moving bazel outputs to goreleaser dist directory for packaging..."
mkdir -p dist/deleterious_darwin_amd64
mkdir -p dist/deleterious_darwin_arm64
mkdir -p dist/deleterious_linux_amd64
mkdir -p dist/deleterious_linux_arm64
mkdir -p dist/deleterious_windows_amd64

sudo cp bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious
sudo cp bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious
sudo cp bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious
sudo cp bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe
sudo cp -f bdist/deleterious-darwin dist/deleterious_darwin_amd64/deleterious
sudo cp -f bdist/deleterious-darwin-m1 dist/deleterious_darwin_arm64/deleterious
sudo cp -f bdist/deleterious-linux dist/deleterious_linux_amd64/deleterious
sudo cp -f bdist/deleterious-linux-arm dist/deleterious_linux_arm64/deleterious
sudo cp -f bdist/deleterious-windows.exe dist/deleterious_windows_amd64/deleterious.exe

0 comments on commit 9123b3e

Please sign in to comment.