-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrelease.sh
84 lines (75 loc) · 1.77 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# $GOOS $GOARCH
# android arm
# darwin 386
# darwin amd64
# darwin arm
# darwin arm64
# dragonfly amd64
# freebsd 386
# freebsd amd64
# freebsd arm
# linux 386
# linux amd64
# linux arm
# linux arm64
# linux ppc64
# linux ppc64le
# linux mips64
# linux mips64le
# netbsd 386
# netbsd amd64
# netbsd arm
# openbsd 386
# openbsd amd64
# openbsd arm
# plan9 386
# plan9 amd64
# solaris amd64
# windows 386
# windows amd64
# env GOOS=linux GOARCH=arm go build -v .
# env GOOS=darwin GOARCH=amd64 go build -v .
# https://github.com/aktau/github-release
#
# expects GITHUB_TOKEN in env
#
github-release info --user shindakun --repo bytepatcher
# TAG=$(git describe $(git rev-list --tags --max-count=1))
TAG="latest"
echo "releasing $TAG"
# if we are re-running, lets delete it first
github-release delete --user shindakun --repo bytepatcher --tag $TAG
# create a formal release
github-release release \
--user shindakun \
--repo bytepatcher \
--tag $TAG \
--name "Bytepatcher CLI Latest" \
--description "Latest Bytepatcher Binaries"
# upload a file, the mac osx amd64 binary
echo "Creating and uploading mac client"
env GOOS=darwin GOARCH=amd64 go build
github-release upload \
--user shindakun \
--repo bytepatcher \
--tag $TAG \
--name "bytepatcher_mac" \
--file bytepatcher
# now linux
env GOOS=darwin GOARCH=amd64 go build
echo "Creating and uploading linux client"
github-release upload \
--user shindakun \
--repo bytepatcher \
--tag $TAG \
--name "bytepatcher_linux" \
--file bytepatcher
# now windows
env GOOS=windows GOARCH=amd64 go build
echo "Creating and uploading windows client"
github-release upload \
--user shindakun \
--repo bytepatcher \
--tag $TAG \
--name "bytepatcher_windows.exe" \
--file bytepatcher.exe