Publishing to GitHub Releases fails sending the request.
I'm having a hell of a time figuring out why I cannot publish my .zip file to GitHub releases, I have created the access token, I have given it full repo rights. I am uploading a single zip artifact, which I can see, but when I publish I always get the same error no matter what:
Creating "WinSCP-PowerShell-v5.13.0.19" release for repository "dotps1/WinSCP" tag "WinSCP-PowerShell-v5.13.0.19" commit "d35fa3ade90cb696931958a938b1e9b6b6eada22"...Error creating GitHub release: An error occurred while sending the request.
I'm not sure what I am missing. Here is my appveyor.yml:
before_deploy:
- ps: xcopy .\WinSCP\* .\deploy\ /S | Out-Null
- ps: Compress-Archive -Path .\deploy\* -DestinationPath .\WinSCP.zip -CompressionLevel Optimal
- ps: Push-AppveyorArtifact -Path .\WinSCP.zip -FileName WinSCP.zip
deploy:
- provider: GitHub
release: WinSCP-PowerShell-v$(APPVEYOR_BUILD_VERSION)
auth_token:
secure: zNRQZ3Yia8BPJrcmjn5x3a0FkrLWCFSgtwaxKGOnBvIiYv6WbWi/ilXezZJclZyE
description: '$(APPVEYOR_REPO_COMMIT_MESSAGE)'
artifact: WinSCP.zip
draft: false
prerelease: false
on:
branch: master
appveyor_repo_tag: false
basically I am copy the source files to a deploy
folder, because otherwise there is a locked dll. Then I compress that into a folder right in the root, WinSCP.zip
. I push that artifact, which works but then it fails to publish, and i'm not real sure how to troubleshoot it.
here is the link to the project: https://ci.appveyor.com/project/dotps1/winscp
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 28 Mar, 2018 07:25 AM
Can you try the to do about the same what AppVeyor is doing in PowerShell from your local machine:
Will it fail the same way?
2 Posted by thomas.malkewit... on 28 Mar, 2018 01:14 PM
I had to create another token for this I didn't keep the last one, but again, I gave it
but how does that work with the artifact? I don't see anything in there in regards to therepo
rights, here is the output:WinSCP.zip
.3 Posted by thomas.malkewit... on 28 Mar, 2018 02:14 PM
if I add this before the
invoke-webrequest
, it works:[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
see this stack overflow article:
https://stackoverflow.com/questions/41618766/powershell-invoke-webr...
4 Posted by thomas.malkewit... on 28 Mar, 2018 02:40 PM
so, I got it to work by adding that line to my
before_deploy
section of the yml. however, now it builds again when the release is published. so its effectively in a build loop. how do I prevent that?https://github.com/dotps1/WinSCP/blob/f2dc9dcc5ff06392659ef570fbb64...
5 Posted by Ilya Finkelshte... on 28 Mar, 2018 05:20 PM
Interesting. Default settings on AppVeyor build worker is all protocols including
Tls2
enabled. And this works with GitHub publishing.I would recommend to run
[Net.ServicePointManager]::SecurityProtocol
in different steps of your build to see what step is breaking SSL settings.As for build loop, add
skip_tags: true
to your YAML.Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:27 AM.