Skip to content

Commit

Permalink
CI: Fix publish step & introduce shasum for binaries (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikkn authored Apr 1, 2021
1 parent 2e88141 commit 293fb8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master'
with:
tag_name: v0.1.${{ github.run_number }}
files: |
klaabu-linux-amd64
klaabu-darwin-amd64
./build/bin/klaabu-linux-amd64
./build/bin/klaabu-darwin-amd64
./build/klaabu-linux-amd64.sha512
./build/klaabu-darwin-amd64.sha512
env:
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN}}

14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NAME := klaabu

BUILD := ${CURDIR}/build
BIN := ${BUILD}/bin/${NAME}
BIN := ${BUILD}/bin

.PHONY: clean tidy compile test run
.PHONY: clean tidy compile shasum test run
.DEFAULT_GOAL := build

clean:
Expand All @@ -21,17 +21,19 @@ vendor:
compile:
ifdef GOOS
ifdef GOARCH
env
go build -mod=readonly -o ${BIN}-$(GOOS)-$(GOARCH) cli/*.go
go build -mod=readonly -o ${BIN}/${NAME}-$(GOOS)-$(GOARCH) cli/*.go
endif
else
go build -mod=readonly -o ${BIN} cli/*.go
go build -mod=readonly -o ${BIN}/${NAME} cli/*.go
endif

shasum:
cd ${BIN} ; for binary in ./* ; do sha512sum $$binary > ${BUILD}/$$binary.sha512 ; done

test:
go test -v ./...

build: tidy fmt vendor compile
build: tidy fmt vendor compile shasum

run: build
${BIN}

0 comments on commit 293fb8e

Please sign in to comment.