Skip to content

Commit

Permalink
Fixed build action
Browse files Browse the repository at this point in the history
- Changed naming scheme
- Plain build workflow removed
  • Loading branch information
githubDante committed Oct 12, 2024
1 parent dd1bbaa commit ed57ed1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 45 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/go-build.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/go-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
with:
go-version: '1.22.x'
- name: Build
run: make all
run: make gh_all
- uses: actions/upload-artifact@v4
with:
name: 'go-solarmanV5-proxy'
path: build
retention-days: 5
retention-days: 90
- uses: actions/download-artifact@v4
with:
path: build
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.PHONY: default all amd64 arm clean
.PHONY: default all amd64 arm clean gh_arm gh_amd64 gh_all

TARGET=go-solarmanV5-proxy


default: amd64
all: arm amd64
gh_all: gh_amd64 gh_arm


amd64:
Expand All @@ -15,6 +16,13 @@ arm:
$(shell mkdir -p build/arm)
GOARCH=arm go build -ldflags "-w -s" -o build/arm/${TARGET}

gh_arm:
$(shell mkdir -p build/arm)
GOARCH=arm go build -ldflags "-w -s" -o build/arm/${TARGET}.arm

gh_amd64:
$(shell mkdir -p build/x64)
GOARCH=amd64 go build -ldflags "-w -s" -o build/x64/${TARGET}.x64

clean:
$(shell rm -rf build)
Expand Down

0 comments on commit ed57ed1

Please sign in to comment.