@@ -151,28 +151,54 @@ jobs:
151151 file_list=$(IFS=','; echo "${files[*]}")
152152 echo "file_list=$file_list" >> $GITHUB_ENV
153153
154- - name : Debug file list
154+ - name : Generate Release Assets
155155 run : |
156156 echo "Files to upload: ${{ env.file_list }}"
157- # If needed, you can split this into an array and process each file individually:
158157 IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
159158 for file in "${file_array[@]}"; do
159+ echo "$file" > asset_files.txt
160160 echo "Processing file: $file"
161161 done
162162 env :
163163 file_list : ${{ env.file_list }}
164164
165165 - name : Upload Release Assets
166- id : upload-release-asset
167- uses : actions/upload-release-asset@v1
168- with :
169- upload_url : ${{ steps.create_release.outputs.upload_url }} # Use the upload URL from the create-release step
170- asset_path : ${{ env.file_list }} # Adjust the path if necessary
171- asset_name : ${{ env.VERSION }}-asset # Name of the asset to upload
172- asset_content_type : application/octet-stream
166+ run : |
167+ IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
168+ for file in "${file_array[@]}"; do
169+ echo "Uploading $file..."
170+ curl -XPOST \
171+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
172+ -H "Content-Type: application/octet-stream" \
173+ --data-binary @$file \
174+ "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$(basename $file)"
175+ done
173176 env :
174- VERSION : ${{ env.VERSION }}
175177 file_list : ${{ env.file_list }}
178+
179+ # - name: Upload Release Assets
180+ # run: |
181+ # # Loop through the asset files and upload them one by one
182+ # for file in $(cat asset_files.txt); do
183+ # echo "Uploading $file..."
184+ # curl -XPOST \
185+ # -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
186+ # -H "Content-Type: application/octet-stream" \
187+ # --data-binary @$file \
188+ # "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$file"
189+ # done
190+
191+ # - name: Upload Release Assets
192+ # id: upload-release-asset
193+ # uses: actions/upload-release-asset@v1
194+ # with:
195+ # upload_url: ${{ steps.create_release.outputs.upload_url }} # Use the upload URL from the create-release step
196+ # asset_path: ${{ env.file_list }} # Adjust the path if necessary
197+ # asset_name: ${{ env.VERSION }}-asset # Name of the asset to upload
198+ # asset_content_type: application/octet-stream
199+ # env:
200+ # VERSION: ${{ env.VERSION }}
201+ # file_list: ${{ env.file_list }}
176202
177203
178204 # - name: Upload Windows Installer
0 commit comments