Skip to content

Commit

Permalink
Zip release files when building
Browse files Browse the repository at this point in the history
  • Loading branch information
stalehd committed May 10, 2022
1 parent c2f96b2 commit 686961a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:

- uses: ncipollo/release-action@v1
with:
artifacts: "bin/span.*"
artifacts: "bin/*.zip"
token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ LDFLAGS := "-X github.com/lab5e/spancli/pkg/global.Version=$(VERSION)"
all: test vet span

release: all
@cd cmd/span && GOOS=linux GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span.amd64-linux
@cd cmd/span && GOOS=darwin GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span.amd64-macOS
@cd cmd/span && GOOS=darwin GOARCH=arm64 go build -ldflags=$(LDFLAGS) -o ../../bin/span.arm64-macOS
@cd cmd/span && GOOS=windows GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span.amd64-win.exe
@cd cmd/span && GOOS=linux GOARCH=arm GOARM=5 go build -ldflags=$(LDFLAGS) -o ../../bin/span.arm5-rpi-linux
@cd cmd/span && GOOS=linux GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span
@cd bin && zip span.amd64-linux.zip span && rm span

@cd cmd/span && GOOS=darwin GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span
@cd bin && zip span.amd64-macos.zip span && rm span

@cd cmd/span && GOOS=darwin GOARCH=arm64 go build -ldflags=$(LDFLAGS) -o ../../bin/span
@cd bin && zip span.arm64-macos.zip span && rm span

@cd cmd/span && GOOS=windows GOARCH=amd64 go build -ldflags=$(LDFLAGS) -o ../../bin/span.exe
@cd bin && zip span.amd64-win.zip span.exe && rm span.exe

@cd cmd/span && GOOS=linux GOARCH=arm GOARM=5 go build -ldflags=$(LDFLAGS) -o ../../bin/span
@cd bin && zip span.arm5-rpi-linux.zip span && rm span

clean:
@rm -rf bin
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ install of this command.

## Installing

You can install this utility by issuing the following command.
If you have Go installed you can install this utility by issuing the following command.

go get github.com/lab5e/spancli/cmd/span@latest

Alternatively you can download one of the prebuilt binaries from the [releases page](https://github.com/lab5e/spancli/releases)

* [Windows](https://github.com/lab5e/spancli/releases/download/span.amd64-win.zip)
* [Linux](https://github.com/lab5e/spancli/releases/download/span.amd64-linux.zip)
* [MacOS (Intel-based)](https://github.com/lab5e/spancli/releases/download/span.amd64-macos.zip)
* [MacOS (M1-based)](https://github.com/lab5e/spancli/releases/download/span.arm64-macos.zip)
* [Raspberry Pi (ARM5)](https://github.com/lab5e/spancli/releases/download/span.arm5-rpi-linux.zip)

Note that the executables are *not signed*.

## Usage

The general usage of `span` is
Expand Down

0 comments on commit 686961a

Please sign in to comment.