Skip to content

Commit

Permalink
Create a zip file for test and use the ref name instead of 'latest' f…
Browse files Browse the repository at this point in the history
…or getting release information
  • Loading branch information
sushmita committed May 21, 2024
1 parent c775e52 commit 7731dcb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/upload-release-asset.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
on:
push:
release:
types: [created]
workflow_dispatch:
# workflow_dispatch:

name: Upload Release Asset

Expand All @@ -19,7 +20,7 @@ jobs:
- name: Gather Latest Release Information
id: get-release-info
run: |
response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/latest")
response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.ref_name }}")
release_id=$(echo "$response" | jq -r '.id')
upload_url=$(echo "$response" | jq -r '.upload_url' | sed 's/{?name,label}//g')
Expand Down

0 comments on commit 7731dcb

Please sign in to comment.