From 36e7a1768719a977b68665937320b7f438e67cc2 Mon Sep 17 00:00:00 2001 From: Trong Nghia Nguyen Date: Wed, 1 Jun 2022 22:22:01 +0700 Subject: [PATCH] Pass github access_token via Authorization header Change-type: patch Signed-off-by: Trong Nghia Nguyen --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index ece1286b796..dc97fec9657 100755 --- a/build.sh +++ b/build.sh @@ -41,8 +41,8 @@ cat > request.json <<-EOF "prerelease": false } EOF -curl --data "@request.json" --header "Content-Type:application/json" \ - "https://api.github.com/repos/$ACCOUNT/$REPO/releases?access_token=$ACCESS_TOKEN" \ +curl --data "@request.json" -H "Authorization:token $ACCESS_TOKEN" -H "Content-Type:application/json" \ + "https://api.github.com/repos/$ACCOUNT/$REPO/releases" \ -o response.json # Parse response RELEASE_ID=$(cat response.json | jq '.id')