diff --git a/.github/workflows/go-build.yaml b/.github/workflows/go-build.yaml deleted file mode 100644 index c6d124b..0000000 --- a/.github/workflows/go-build.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go-Build - -on: - push: - branches: [ "main" ] -# pull_request: -# branches: [ "main" ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.22.x' - - - name: Build - # run: go build -v ./... - run: make all - - uses: actions/upload-artifact@v4 - with: - name: 'go-solarmanV5-proxy' - path: build - retention-days: 5 - - - uses: actions/download-artifact@v4 - with: - path: build - - - - name: List artifacts - run: ls -R build/ - -# - name: Test -# run: go test -v ./... diff --git a/.github/workflows/go-release.yaml b/.github/workflows/go-release.yaml index cc2a118..ede56fc 100644 --- a/.github/workflows/go-release.yaml +++ b/.github/workflows/go-release.yaml @@ -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 diff --git a/Makefile b/Makefile index f23039e..de7ce29 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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)