Skip to content

Commit dec140a

Browse files
authored
Merge pull request #19 from timbray/issue-15
add binaries to release workflow
2 parents dc3a9fc + 8146cad commit dec140a

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

.github/workflows/release.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
30+
uses: actions/checkout@v2
3131
with:
3232
fetch-depth: 0
3333
ref: "main"
@@ -55,6 +55,7 @@ jobs:
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
run: |
58+
make release
5859
echo "Using tag $TAG to create release"
59-
gh release create -F RELEASE_CHANGELOG.md ${TAG} LICENSE README.md
60+
gh release create -F RELEASE_CHANGELOG.md ${TAG} LICENSE README.md *.gz *.zip
6061

Makefile

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
.PHONY: test
22

3-
all: test build
3+
all: test tf
44

5-
test: */*.go
5+
test: main.go internal/*.go
66
go test ./... && go vet ./...
77

8-
build: bin/macos-arm/tf bin/macos-x86/tf bin/linux-x86/tf bin/linux-arm/tf
9-
10-
bin/macos-arm/tf: */*.go
11-
GOOS=darwin GOARCH=arm64 go build -o bin/macos-arm/tf
12-
13-
bin/macos-x86/tf: */*.go
14-
GOOS=darwin GOARCH=amd64 go build -o bin/macos-x86/tf
15-
16-
bin/linux-x86/tf: */*.go
17-
GOOS=linux GOARCH=amd64 go build -o bin/linux-x86/tf
18-
19-
bin/linux-arm/tf: */*.go
20-
GOOS=linux GOARCH=arm64 go build -o bin/linux-arm/tf
21-
22-
8+
# local version you can run
9+
tf:
10+
go build -o bin/tf
11+
12+
release: test
13+
GOOS=darwin GOARCH=arm64 go build -o tf && gzip < tf > tf-macos-arm.gz
14+
GOOS=darwin GOARCH=amd64 go build -o tf && gzip < tf > tf-macos-x86.gz
15+
GOOS=linux GOARCH=amd64 go build -o tf && gzip < tf > tf-linux-x86.gz
16+
GOOS=linux GOARCH=arm64 go build -o tf && gzip < tf > tf-linux-arm.gz
17+
GOOS=windows GOARCH=amd64 go build -o tf && zip -mq tf-windows-x86.exe.zip tf
18+
GOOS=windows GOARCH=arm64 go build -o tf && zip -mq tf-windows-arm.exe.zip tf

0 commit comments

Comments
 (0)