Skip to content

Commit

Permalink
add multi link support
Browse files Browse the repository at this point in the history
  • Loading branch information
sajjadsabzkar authored Jun 11, 2024
1 parent 04fb310 commit 5624c06
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/UploadIntoRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Download and Release
on:
workflow_dispatch:
inputs:
file_url:
description: 'The URL of the file to download'
file_urls:
description: 'Comma-separated file URLs to download, e.g., https://example.com/file1.zip,https://example.com/file2.zip'
required: true
permissions:
contents: write
Expand All @@ -27,10 +27,13 @@ jobs:

- name: Create download directory
run: mkdir -p download
- name: Download file
- name: Download files
run: |
curl -L ${{ github.event.inputs.file_url }} -o download/${{ steps.extract_filename.outputs.filename }}
IFS=',' read -r -a file_url_array <<< "${{ github.event.inputs.file_urls }}"
for file_url in "${file_url_array[@]}"; do
filename=$(basename $file_url)
curl -L $file_url -o download/$filename
done
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
Expand Down

0 comments on commit 5624c06

Please sign in to comment.