Skip to content

Commit 7dd46cf

Browse files
committed
run goreleaser as part of CI
1 parent 63c7167 commit 7dd46cf

File tree

4 files changed

+30
-9
lines changed

4 files changed

+30
-9
lines changed

.github/workflows/main.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: build
1+
name: ci
22
on: push
33
jobs:
4-
build:
4+
test:
55
runs-on: ubuntu-latest
66
steps:
77
- name: checkout
@@ -10,5 +10,15 @@ jobs:
1010
- name: test
1111
run: make docker-test
1212

13-
- name: build
14-
run: make docker-build-static
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
needs: test
16+
if: startsWith(github.ref, 'refs/tags/v')
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v2
20+
21+
- name: goreleaser
22+
run: make release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
builds:
22
- env:
33
- CGO_ENABLED=0
4+
- GOFLAGS = -mod=vendor
5+
- GO111MODULE = on
46
goos:
57
- windows
68
- linux
79
- darwin
10+
flags:
11+
- -trimpath
12+
- -tags=netgo
13+
- -a
14+
ldflags:
15+
- -extldflags "-static"
816
archives:
917
- format: tar.gz
1018
format_overrides:

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ docker-test:
2121
docker run -t -v $$PWD:/go/src/github.com/yannh/redis-dump-go -w /go/src/github.com/yannh/redis-dump-go golang:1.14 make test
2222

2323
docker-build-static:
24-
docker run -t -v $$PWD:/go/src/github.com/yannh/redis-dump-go -w /go/src/github.com/yannh/redis-dump-go golang:1.14 make build-static
24+
docker run -t -v $$PWD:/go/src/github.com/yannh/redis-dump-go -w /go/src/github.com/yannh/redis-dump-go golang:1.14 make build-static
25+
26+
release:
27+
docker run -e GITHUB_TOKEN -t -v $$PWD:/go/src/github.com/yannh/redis-dump-go -w /go/src/github.com/yannh/redis-dump-go goreleaser/goreleaser:v0.138 goreleaser release --rm-dist

Readme.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Dump Redis keys to a file. Similar in spirit to https://www.npmjs.com/package/redis-dump and https://github.com/delano/redis-dump but:
66

7-
* Will dump keys across several processes & connections
8-
* Uses SCAN rather than KEYS * for much reduced memory footprint with large databases
9-
* Easy to deploy & containerize - single binary.
10-
* Generates a [RESP](https://redis.io/topics/protocol) file rather than a JSON or a list of commands. This is faster to ingest, and [recommended by Redis](https://redis.io/topics/mass-insert) for mass-inserts.
7+
* Will dump keys across **several processes & connections**
8+
* Uses SCAN rather than KEYS * for much **reduced memory footprint** with large databases
9+
* Easy to deploy & containerize - **single binary**.
10+
* Generates a [RESP](https://redis.io/topics/protocol) file rather than a JSON or a list of commands. This is **faster to ingest**, and [recommended by Redis](https://redis.io/topics/mass-insert) for mass-inserts.
1111

1212
Warning: like similar tools, Redis-dump-go does NOT provide Point-in-Time backups. Please use [Redis backups methods](https://redis.io/topics/persistence) when possible.
1313

0 commit comments

Comments
 (0)