I built a batch file to make Github releases from my CI server on AppVeyor. Everything works fine except when I try to upload my asset to Github. My skills don't help me very much. Is there a method to get my release id from cURL commands to use it on upload assets URL? Thanks very much :)
EDIT: I use 3 batch files:
AppveyorBuildReleases.bat
git tag %PLATFORM%_%APPVEYOR_BUILD_VERSION%
git push https://token_here:@github.com/2spark/SparklrWP.git --tags
echo {"tag_name": "%PLATFORM%_%APPVEYOR_BUILD_VERSION%","target_commitish": "%APPVEYOR_REPO_BRANCH%","name": "2spark v%APPVEYOR_BUILD_VERSION% for %PLATFORM% devices","body": "Release of 2spark app v%APPVEYOR_BUILD_VERSION%\n Commit by %APPVEYOR_REPO_COMMIT_AUTHOR% \n%APPVEYOR_REPO_COMMIT_MESSAGE%","draft": false,"prerelease": true} > json.json
curl -# -XPOST -H 'Content-Type:application/json' -H 'Accept:application/json' --data-binary @json.json https://api.github.com/repos/2spark/SparklrWP/releases?access_token=token_here
del json.json
move c:\projects\SparklrWP\SparklrForWindowsPhone\SparklrForWindowsPhone\Bin\%PLATFORM%\%CONFIGURATION%\SparklrForWindowsPhone_%CONFIGURATION%_%PLATFORM%.xap c:\projects\SparklrWP
rename c:\projects\SparklrWP\SparklrForWindowsPhone_%CONFIGURATION%_%PLATFORM%.xap SparklrForWindowsPhone.xap
file_size.bat "c:\projects\SparklrWP\SparklrForWindowsPhone.xap"
file_size.bat
set size=%~z1
AppVeyorBuildReleases2.bat
AppVeyorBuildReleases2.bat
curl -XPOST -H "Authorization:token token_here" -H "Content-Type:application/octet-stream" -H "Content-Length:%size%" --data-binary @SparklrForWindowsPhone.xap https://uploads.github.com/repos/2spark/SparklrWP/releases/TheIDgoesHERE/assets?name=SparklrForWindowsPhone.xap
EXIT
But I don't know how to find the id. Can you help me please? :)