Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Amiya-873 authored Sep 24, 2024
1 parent cba3b3e commit 2b095b8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ jobs:

- name: Upload release assets
run: |
for file in dist/*.zip; do
echo "Listing files in the dist directory:"
ls -l dist # List files to be uploaded
# Loop through each ZIP and JAR file in the dist directory and upload them
for file in dist/*.{zip,jar}; do
if [ -f "$file" ]; then
echo "Uploading $file"
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/zip" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ steps.create_release.outputs.upload_url }}&name=$(basename "$file")"
# Check if upload was successful
if [ $? -ne 0 ]; then
echo "Failed to upload $file"
fi
"${{ steps.create_release.outputs.upload_url }}?name=$(basename "$file")" || echo "Failed to upload $file"
fi
done

0 comments on commit 2b095b8

Please sign in to comment.