forked from acarl005/ls-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·56 lines (44 loc) · 968 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -ex
if ! command -v github-release >/dev/null; then
echo must install github-release
echo go get github.com/github-release/github-release
exit 1
fi
if [ -z "$GITHUB_TOKEN" ]; then
echo must set GITHUB_TOKEN >&2
exit 1
fi
TAG=0.2.1
git tag -a v$TAG -m "release v$TAG"
git push origin master --tags
./compile
github-release release \
--user acarl005 \
--repo ls-go \
--tag v$TAG \
--name v$TAG
github-release upload \
--user acarl005 \
--repo ls-go \
--tag v$TAG \
--name ls-go-darwin-amd64 \
--file ls-go-darwin-amd64
github-release upload \
--user acarl005 \
--repo ls-go \
--tag v$TAG \
--name ls-go-linux-amd64 \
--file ls-go-linux-amd64
github-release upload \
--user acarl005 \
--repo ls-go \
--tag v$TAG \
--name ls-go-linux-arm64 \
--file ls-go-linux-arm64
github-release upload \
--user acarl005 \
--repo ls-go \
--tag v$TAG \
--name ls-go-linux-386 \
--file ls-go-linux-386