Skip to content

Commit ba2394d

Browse files
Merge pull request #14 from filipecosta90/improve.release
Improved/Secured release process. Using GH links to access the prebuilt binaries
2 parents 910accb + 8797d3a commit ba2394d

File tree

3 files changed

+66
-37
lines changed

3 files changed

+66
-37
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
name: Publish binaries to GH
1+
# .github/workflows/github-release-publish.yml
2+
name: Publish artifacts to github release
23

34
on:
45
release:
5-
types: [ published ]
6+
types: [published]
67

78
jobs:
8-
publish:
9+
releases-matrix:
10+
name: Release Go Binary
911
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
goos: [linux, darwin,windows]
15+
goarch: [amd64, arm64]
1016
steps:
11-
- uses: actions/checkout@master
17+
- uses: actions/checkout@v3
18+
- uses: wangyoucao577/[email protected]
1219
with:
13-
fetch-depth: 1
14-
- name: Install Go
15-
uses: actions/setup-go@v2
16-
with:
17-
go-version: 1.16.x
18-
- name: Make Release
19-
run: make release
20-
- name: Upload release binaries
21-
uses: alexellis/[email protected]
22-
env:
23-
GITHUB_TOKEN: ${{ github.token }}
24-
with:
25-
asset_paths: '["./dist/redis-benchmark-go_*"]'
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
goos: ${{ matrix.goos }}
22+
goarch: ${{ matrix.goarch }}
23+
binary_name: "./redis-benchmark-go"
24+
sha256sum: true
25+
asset_name: redis-benchmark-go-${{ matrix.goos }}-${{ matrix.goarch }}
26+
build_command: "make"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
22
coverage.txt
33
redis-benchmark-go
4-
dist
4+
dist
5+
*.json

README.md

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,64 @@
22

33
## Overview
44

5-
This repo contains code to mimic redis-benchmark capabilities in go solely for OSS redis cluster.
5+
This repo contains code to mimic redis-benchmark capabilities in go.
66

77

8-
## Standalone binaries ( no Golang needed )
8+
## Getting Started
9+
10+
### Download Standalone binaries ( no Golang needed )
911

1012
If you don't have go on your machine and just want to use the produced binaries you can download the following prebuilt bins:
1113

12-
| OS | Arch | Link |
13-
| :--- | :---: | ---: |
14-
| Windows | amd64 (64-bit X86) | [redis-benchmark-go_windows_amd64.exe](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_windows_amd64.exe) |
15-
| Linux | amd64 (64-bit X86) | [redis-benchmark-go_linux_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_linux_amd64) |
16-
| Linux | arm64 (64-bit ARM) | [redis-benchmark-go_linux_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_linux_arm64) |
17-
| Linux | arm (32-bit ARM) | [redis-benchmark-go_linux_arm](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_linux_arm) |
18-
| Darwin | amd64 (64-bit X86) | [redis-benchmark-go_darwin_amd64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_darwin_amd64) |
19-
| Darwin | arm64 (64-bit ARM) | [redis-benchmark-go_darwin_arm64](https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_darwin_arm64) |
14+
https://github.com/filipecosta90/redis-benchmark-go/releases/latest
2015

16+
Here's how:
2117

18+
**Linux**
2219

23-
Here's an example on how to use the above links:
24-
```bash
25-
# Fetch this repo
26-
wget https://s3.amazonaws.com/benchmarks.redislabs/tools/redis-benchmark-go/redis-benchmark-go_linux_amd64
20+
x86
21+
```
22+
wget -c https://github.com/filipecosta90/redis-benchmark-go/releases/latest/download/redis-benchmark-go-linux-amd64.tar.gz -O - | tar -xz
23+
24+
# give it a try
25+
./redis-benchmark-go --help
26+
```
27+
28+
arm64
29+
```
30+
wget -c https://github.com/filipecosta90/redis-benchmark-go/releases/latest/download/redis-benchmark-go-linux-arm64.tar.gz -O - | tar -xz
31+
32+
# give it a try
33+
./redis-benchmark-go --help
34+
```
2735

28-
# change permissions
29-
chmod 755 redis-benchmark-go_linux_amd64
36+
**OSX**
37+
38+
x86
39+
```
40+
wget -c https://github.com/filipecosta90/redis-benchmark-go/releases/latest/download/redis-benchmark-go-darwin-amd64.tar.gz -O - | tar -xz
41+
42+
# give it a try
43+
./redis-benchmark-go --help
44+
```
45+
46+
arm64
47+
```
48+
wget -c https://github.com/filipecosta90/redis-benchmark-go/releases/latest/download/redis-benchmark-go-darwin-arm64.tar.gz -O - | tar -xz
49+
50+
# give it a try
51+
./redis-benchmark-go --help
52+
```
53+
54+
**Windows**
55+
```
56+
wget -c https://github.com/filipecosta90/redis-benchmark-go/releases/latest/download/redis-benchmark-go-windows-amd64.tar.gz -O - | tar -xz
3057
31-
# give it a try
32-
./redis-benchmark-go_linux_amd64 --help
58+
# give it a try
59+
./redis-benchmark-go --help
3360
```
3461

35-
## Installation in a Golang env
62+
### Installation in a Golang env
3663

3764
The easiest way to get and install the benchmark utility with a Go Env is to use
3865
`go get` and then `go install`:

0 commit comments

Comments
 (0)