Skip to content

Commit

Permalink
Fix pipeline (#3)
Browse files Browse the repository at this point in the history
* workflow:: fix pipeline #1

* workflow:: fix pipeline #2 (sudo)

* workflow: create a release on tag

* workflow: fix release create

* workflow: use other gh action for uploading release

* workflow: create zip file containing builds

* workflow:: remove useless target
  • Loading branch information
milairhu authored Nov 14, 2024
1 parent 7cbf58d commit c7f5266
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build
path: /tmp/build
path: build
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Upload release
uses: softprops/action-gh-release@v2
with:
files: /tmp/build.zip
files: build/*
make_latest: true

13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@ UNAME_S := $(shell uname -s)

REPO_NAME := tinkey

pre-run:
mkdir -p $$HOME/go/src/$(dirname )
ln -svf . $$HOME/go/src/${REPO_NAME}
cd $$HOME/go/src/${REPO_NAME}

test: pre-run

test:
go fmt $$(go list ./... | grep -v /vendor/)
go vet $$(go list ./... | grep -v /vendor/)
go test -race $(go list ./... | grep -v /vendor/)

build: pre-run
build:
GOOS=linux GOARCH=amd64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey-linux-amd64
GOOS=linux GOARCH=arm64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey-linux-arm64
GOOS=windows GOARCH=amd64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey.exe
GOOS=darwin GOARCH=arm64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey-darwin-arm64
GOOS=darwin GOARCH=amd64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey-darwin-amd64
mv ./build /tmp/build
zip -r /tmp/build.zip /tmp/build
GOOS=darwin GOARCH=amd64 go build -ldflags "-extldflags '-static'" -trimpath -o ./build/tinkey-darwin-amd64

0 comments on commit c7f5266

Please sign in to comment.