Skip to content

Commit

Permalink
fix: make file not building correctly (#307)
Browse files Browse the repository at this point in the history
Co-authored-by: Jake Van Vorhis <[email protected]>
  • Loading branch information
jrschumacher and jakedoublev authored Aug 22, 2024
1 parent fdd8167 commit 64eb821
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,16 @@ jobs:
# git push origin v${{ steps.release.outputs.major }}
# git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

- name: Build
- name: Build, compress, and draft checksums
if: ${{ steps.release.outputs.release_created }}
env:
SEM_VER: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
COMMIT_SHA: ${{ steps.release.outputs.sha }}
run: make build

- name: Compress the builds and generate checksums
if: ${{ steps.release.outputs.release_created }}
env:
SEM_VER: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
run: make zip-builds

- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./output/**/*
run: gh release upload ${{ steps.release.outputs.tag_name }} ./output/*

22 changes: 9 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,28 @@ OUTPUT_DIR=output
# Build commands for each platform
PLATFORMS := darwin-amd64 darwin-arm64 linux-amd64 linux-arm linux-arm64 windows-amd64-.exe windows-arm-.exe windows-arm64-.exe

build: clean $(addprefix build-,$(PLATFORMS))
build: test clean $(addprefix build-,$(PLATFORMS)) zip-builds verify-checksums

build-%:
GOOS=$(word 1,$(subst -, ,$*)) GOARCH=$(word 2,$(subst -, ,$*)) go build $(GO_BUILD_FLAGS) -o $(GO_BUILD_PREFIX)-$(word 1,$(subst -, ,$*))-$(word 2,$(subst -, ,$*))$(word 3,$(subst -, ,$*))

zip-builds:
./.github/scripts/zip-builds.sh $(BINARY_NAME)-$(CURR_VERSION) $(TARGET_DIR) $(OUTPUT_DIR)

verify-checksums:
./.github/scripts/verify-checksums.sh $(OUTPUT_DIR) $(BINARY_NAME)-$(CURR_VERSION)_checksums.txt

# Target for running the project (adjust as necessary for your project)
.PHONY: run
run: build
run:
go run .

# Target for testing the project
.PHONY: test
test: build
test:
go test -v ./...

# Target for cleaning up the target directory
.PHONY: clean
clean:
rm -rf $(TARGET_DIR)

# Script for zipping up the compiled binaries
.PHONY: zip-builds
zip-builds:
./.github/scripts/zip-builds.sh $(BINARY_NAME)-$(CURR_VERSION) $(TARGET_DIR) $(OUTPUT_DIR)

# Script for verifying the checksums
.PHONY: verify-checksums
verify-checksums:
.github/scripts/verify-checksums.sh $(OUTPUT_DIR) $(BINARY_NAME)-$(CURR_VERSION)_checksums.txt

0 comments on commit 64eb821

Please sign in to comment.