From a3b912cc2d0de4e73e762b70ff72e596a52702c7 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Tue, 13 Sep 2022 21:32:04 +0100 Subject: [PATCH] switch to gh cli for releases --- do-release.sh | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/do-release.sh b/do-release.sh index 2ec2454..43195f2 100755 --- a/do-release.sh +++ b/do-release.sh @@ -22,15 +22,8 @@ LDFLAGS="-s -w \ -X \"github.com/naggie/dsnet.BUILD_DATE=$BUILD_DATE\"\ " -# get release information -if ! test -f $RELEASE_FILE || head -n 1 $RELEASE_FILE | grep -vq $VERSION; then - # file doesn't exist or is for old version, replace - printf "$VERSION\n\n\n" > $RELEASE_FILE -fi - vim "+ normal G $" $RELEASE_FILE - # build mkdir -p dist @@ -49,9 +42,14 @@ GOARCH=amd64 go build -ldflags="$LDFLAGS" -o dist/dsnet cmd/root.go # upx -q dsnet mv dist/dsnet dist/dsnet-linux-amd64 -hub release create \ - -a dist/dsnet-linux-arm5#"dsnet linux-arm5" \ - -a dist/dsnet-linux-arm64#"dsnet linux-arm64" \ - -a dist/dsnet-linux-amd64#"dsnet linux-amd64" \ - -F $RELEASE_FILE \ - $1 +# github.com/cli/cli +# https://github.com/cli/cli/releases/download/v2.15.0/gh_2.15.0_linux_amd64.deb +# do: gh auth login +gh release create \ + --title $VERSION \ + --notes-file $RELEASE_FILE \ + --draft \ + $VERSION \ + dist/dsnet-linux-arm5#"dsnet linux-arm5" \ + dist/dsnet-linux-arm64#"dsnet linux-arm64" \ + dist/dsnet-linux-amd64#"dsnet linux-amd64" \