Skip to content

Commit

Permalink
config(ci)
Browse files Browse the repository at this point in the history
/spend 3h
  • Loading branch information
Goutte committed Apr 1, 2023
1 parent dbe6865 commit 8aa6d1c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
release:
types: [created]
name: Handle Release
jobs:
generate:
name: Create release-artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Install upx
run: apt install upx
- name: Generate the artifacts
run: make release
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'build/git-spend*'
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ clean:

build:# $(shell find . -name \*.go)
go build -ldflags="$(LD_FLAGS_STRIP)" -o $(BINARY_PATH) $(SOURCE)
#echo "Your very own copy of git-spend is available here: $(BINARY_PATH)"

build-coverage:
go build -cover -o $(BINARY_PATH)-coverage $(SOURCE)

build-linux-arm64: $(shell find . -name \*.go)
GOOS=windows GOARCH=arm64 go build -ldflags="$(LD_FLAGS_STRIP)" -o $(BINARY_PATH).arm64 $(SOURCE)

build-windows-amd64: $(shell find . -name \*.go)
GOOS=windows GOARCH=amd64 go build -ldflags="$(LD_FLAGS_STRIP)" -o $(BINARY_PATH).exe $(SOURCE)

release: clean build build-windows-amd64
release: clean build build-windows-amd64 build-linux-arm64
upx --ultra-brute $(BINARY_PATH)
upx --ultra-brute $(BINARY_PATH).exe

Expand Down

0 comments on commit 8aa6d1c

Please sign in to comment.