From 013bd492e0d0b12628ea107333768f78fcf0ae1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=8F=E6=98=8E?= Date: Mon, 16 Aug 2021 16:27:57 +0800 Subject: [PATCH] =?UTF-8?q?CI:=E4=BF=AE=E6=AD=A3=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95d1273..1798668 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: - name: Build run: | sh build.sh + ls -l build/* - name: Upload env: @@ -35,10 +36,11 @@ jobs: run: | sudo apt-get install -y jq GIT_TAG=`echo $GITHUB_REF | sed 's/refs\/tags\///'` - upload_url=`curl \ + # get upload url + API_UPLOAD_URL=`curl \ -X POST \ - -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${GITHUB_TOKEN}" \ https://api.github.com/repos/${GITHUB_REPOSITORY}/releases \ -d '{"tag_name":"'${GIT_TAG}'"}' \ | jq --raw-output '.upload_url' \ @@ -46,21 +48,24 @@ jobs: # upload curl \ -X POST \ - -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ - -F 'file=@build/polong-core-linux' \ - ${upload_url}=polong-core-linux + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @'build/polong-core-linux' \ + ${API_UPLOAD_URL}=polong-core-linux # upload curl \ -X POST \ - -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ - -F 'file=@build/polong-core-windows' \ - ${upload_url}=polong-core-windows + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @'build/polong-core-windows' \ + ${API_UPLOAD_URL}=polong-core-windows # upload curl \ -X POST \ - -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ - -F 'file=@build/polong-core.aar' \ - ${upload_url}=polong-core.aar + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @'build/polong-core.aar' \ + ${API_UPLOAD_URL}=polong-core.aar