From 3b22e52c0fc6ceb76002312a501840d8226b1327 Mon Sep 17 00:00:00 2001 From: EItanya Date: Sat, 13 Nov 2021 13:54:54 +0000 Subject: [PATCH] release should work now --- .github/workflows/release.yaml | 2 +- Makefile | 15 +++++++++++---- ci/release_assets.go | 24 ++++++++++++------------ 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a4cbbf1..2a43b0c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,7 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-go- - name: Upload Assets - run: make upload-github-release-assets + run: ls && make upload-github-release-assets env: GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} TAGGED_VERSION: ${{ github.event.release.tag_name }} \ No newline at end of file diff --git a/Makefile b/Makefile index 50d24a4..21fb9dd 100644 --- a/Makefile +++ b/Makefile @@ -35,16 +35,23 @@ docker-push: # CLI #---------------------------------------------------------------------------------- -.PHONY: ebpfctl-linux-amd64 -ebpfctl-linux-amd64: $(OUTDIR)/ebpfctl-linux-amd64 + $(OUTDIR)/ebpfctl-linux-amd64: $(SOURCES) CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags=$(LDFLAGS) -gcflags=$(GCFLAGS) -o $@ ebpfctl/main.go -.PHONY: ebpfctl-linux-arm64 -ebpfctl-linux-arm64: $(OUTDIR)/ebpfctl-linux-arm64 +.PHONY: ebpfctl-linux-amd64 +ebpfctl-linux-amd64: $(OUTDIR)/ebpfctl-linux-amd64.sha256 +$(OUTDIR)/ebpfctl-linux-amd64.sha256: $(OUTDIR)/ebpfctl-linux-amd64 + sha256sum $(OUTDIR)/ebpfctl-linux-amd64 > $@ + $(OUTDIR)/ebpfctl-linux-arm64: $(SOURCES) CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -ldflags=$(LDFLAGS) -gcflags=$(GCFLAGS) -o $@ ebpfctl/main.go +.PHONY: ebpfctl-linux-arm64 +ebpfctl-linux-arm64: $(OUTDIR)/ebpfctl-linux-arm64.sha256 +$(OUTDIR)/ebpfctl-linux-arm64.sha256: $(OUTDIR)/ebpfctl-linux-arm64 + sha256sum $(OUTDIR)/ebpfctl-linux-arm64 > $@ + .PHONY: build-cli build-cli: ebpfctl-linux-amd64 ebpfctl-linux-arm64 diff --git a/ci/release_assets.go b/ci/release_assets.go index b669755..11bd98c 100644 --- a/ci/release_assets.go +++ b/ci/release_assets.go @@ -7,20 +7,20 @@ import ( func main() { const buildDir = "_output" const repoOwner = "solo-io" - const repoName = "ebpf" + const repoName = "eBPF" - assets := make([]githubutils.ReleaseAssetSpec, 3) - assets[0] = githubutils.ReleaseAssetSpec{ - Name: "ebpfctl-linux-amd64", - ParentPath: buildDir, - UploadSHA: true, + assets := []githubutils.ReleaseAssetSpec{ + { + Name: "ebpfctl-linux-amd64", + ParentPath: buildDir, + UploadSHA: true, + }, + { + Name: "ebpfctl-linux-arm64", + ParentPath: buildDir, + UploadSHA: true, + }, } - assets[1] = githubutils.ReleaseAssetSpec{ - Name: "ebpfctl-linux-arm64", - ParentPath: buildDir, - UploadSHA: true, - } - spec := githubutils.UploadReleaseAssetSpec{ Owner: repoOwner, Repo: repoName,