Skip to content

Commit

Permalink
chore(build): improve release artifact
Browse files Browse the repository at this point in the history
1. Rename properly
2. Compress binary
  • Loading branch information
vst committed Jul 18, 2022
1 parent b9f3cd6 commit 9ed68dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ git push --follow-tags origin main
## Build application:
nix-build --arg doStatic true

## Get compiled output file path:
_infile="result/bin/deback"

## Get compressed, renamed output file path:
_outfile="deback-v${_VERSION_NEXT}-$(uname -s)-$(uname -m)-static"

## Compress file:
upx -o "${_outfile}" "${_infile}"

## Release
gh release create "v${_VERSION_NEXT}" --generate-notes
gh release upload "v${_VERSION_NEXT}" result/bin/deback
gh release upload "v${_VERSION_NEXT}" "${_outfile}"

## Remove outfile:
rm "${_outfile}"
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ pkgs.mkShell {
pkgs.lolcat

## Release stuff:
pkgs.busybox
pkgs.gh
pkgs.git
pkgs.git-chglog
pkgs.upx

## Haskell stuff:
ghc
Expand Down

0 comments on commit 9ed68dc

Please sign in to comment.