Skip to content

Commit

Permalink
workflow: Fix issue with duplicate binary archives.
Browse files Browse the repository at this point in the history
Not cleaning up build directory after packaging for each architecture
build has finished leads to duplicate binaries being left in `build/`.
  • Loading branch information
hjpotter92 committed Feb 16, 2022
1 parent 5c76ebe commit dbd2c4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,22 @@ jobs:
run: |
go get -v -t -d ./...
- name: Build
- name: Build binaries
shell: bash
run: |
mkdir -p build/ releases/
for platform in linux darwin windows
do
for arch in arm64 amd64
do
cd "build/" && rm -rf * && cd -
GOOS="$platform" GOARCH="$arch" make -j4 all GO_BUILD_DIR="build/"
cd "build/"
for file in $(find . -type f -perm -a+x)
do
f_name="$(basename $file)"
mv "${f_name}" "livepeer-${f_name}"
if [ "$platform" = "windows" ]
if [ "$platform" == "windows" ]
then
zip -9 "../releases/livepeer-${f_name/.exe/}-windows-${arch}.zip" "livepeer-${f_name}"
else
Expand Down

0 comments on commit dbd2c4c

Please sign in to comment.