From f156034737786debd1b8e4764fba24aa9450fa32 Mon Sep 17 00:00:00 2001 From: Ming Fang Date: Sun, 26 Apr 2020 16:02:52 -0400 Subject: [PATCH] add release script --- release.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 release.sh diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..23181fe --- /dev/null +++ b/release.sh @@ -0,0 +1,17 @@ +if [ -z "GITHUB_TOKEN" ] +then + echo "export GITHUB_TOKEN=<>" + exit 1 +fi + +if [ $# -eq 0 ]; then + echo "Pass release version. e.g. v0.1.0" + exit 1 +fi + +VERSION=$1 +echo "Releasing version $VERSION" +goreleaser --snapshot --rm-dist +git tag -a $VERSION -m "$VERSION" +git push origin $VERSION +goreleaser release --rm-dist