diff --git a/bin/upload-github b/bin/upload-github index a78a60d31..f4fa1cdc7 100755 --- a/bin/upload-github +++ b/bin/upload-github @@ -2,49 +2,45 @@ # # Upload a release # -# Needs github-release from https://github.com/aktau/github-release +# Needs the gh tool from https://github.com/cli/cli set -e -REPO="rclone" +REPO="rclone/rclone" if [ "$1" == "" ]; then echo "Syntax: $0 Version" exit 1 fi VERSION="$1" -if [ "$GITHUB_USER" == "" ]; then - echo 1>&2 "Need GITHUB_USER environment variable" - exit 1 -fi -if [ "$GITHUB_TOKEN" == "" ]; then - echo 1>&2 "Need GITHUB_TOKEN environment variable" - exit 1 -fi +ANCHOR=$(grep '^## v' docs/content/changelog.md | head -1 | sed 's/^## //; s/[^A-Za-z0-9-]/-/g; s/--*/-/g') -echo "Making release ${VERSION}" -github-release release \ +cat > "/tmp/${VERSION}-release-notes" <