From c78e377bda8160fb56fbc1efc0666c6c846de8c0 Mon Sep 17 00:00:00 2001 From: xosnrdev Date: Wed, 7 Aug 2024 02:58:11 -0400 Subject: [PATCH] ci: fixing upload binary permission issue --- .github/workflows/release.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9f2edeb..a98349d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,11 +27,10 @@ jobs: with: toolchain: stable - - name: Get upload url - id: get_release_url - uses: bruceadams/get-release@v1.3.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Prepare upload url + run: | + UPLOAD_URL="$(jq -r '.release.upload_url' "$GITHUB_EVENT_PATH" | sed -e "s/{?name,label}$/?name=${ARCHIVE_NAME}/")" + echo "UPLOAD_URL=${UPLOAD_URL}" >> $GITHUB_ENV - name: Build binary run: | @@ -43,7 +42,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.get_release_url.outputs.upload_url }} + upload_url: ${{ env.UPLOAD_URL }} asset_path: ${{ env.ARCHIVE_NAME }} asset_name: ${{ env.ARCHIVE_NAME }} asset_content_type: application/gzip