Open slodki opened 6 years ago
Token and permissions have not changed since last successful deploy. I don't have access to second link but my own script can upload file to the release with the same token without problems.
Sorry for sending you a link to the private thread. Here is the script I suggest to try. If you look at the top of that script you'll see few variables specific for your repository/artifact, please replace then with respective valuyes. gh_token
token should be set as secure variable on either UI or in appveyor.yml
.
By the way, how GitHub_auth_token
is set for your project? In UI? If yes, there is a common mistake when people encrypt variable in https://ci.appveyor.com/tools/encrypt, then paste encrypted valueto UI and then press "lock", thus encrypting it second time. If this is your case, token is not going to work.
Also I did not know that "last successful deploy" exist. Can you point to it?
Previous successful deployments:
Token set as secure variable from web UI and not changes for months.
I'll prepare build with your script. I'll put your script as the last command in on_success
.
I would just try to generate and try another token first, even if it supposed to be good.
I thing problem is triggered by overwriting the same filename release asset attempt. But it still appears after adding force_update: true
I have tested deployment with token copied from web UI few minutes ago with my own script and it was successful. It's confirmed token is working.
Can you confirm that removing force_update: true
makes deployment work?
No, result is the same. The first deployment with the same tag, release and filename succeeded. Next deployment with the identical tag, release and filename failed (here https://ci.appveyor.com/project/moneymanagerex/moneymanagerex/build/494). Adding force_update: true
changed nothing.
Sorry for random fail and try approach, but I feel that problem can be with a special symbol ~
. I will try to repro myself now. But if you could try to do 2 deployments in a row with file name which does not have this symbol, that would be great.
This is test with your script (filename = README.TXT). I think your script tries to create release 2nd time and this generates error in your script. Release was created and first copy of README.TXT was uploaded, next job failed:
https://ci.appveyor.com/project/moneymanagerex/moneymanagerex/build/533
Original deployment script detects existing release and moves to next step - uploading asset.
I checked, tilde (~
) is the problem. Watch https://github.com/appveyor/ci/issues/2322, remove ~
or replace it with .
as a workaround.
It's possible. From AppVeyor log:
Deploying using GitHub provider
Creating "nightly" release for repository "moneymanagerex/moneymanagerex" tag "nightly" commit "22134cb68df42cb0766fea1b083d76a0acb14298"...
Skipped - release with tag "nightly" already exists
Uploading "mmex-1.4.0~alpha4-win64-portable.zip" to release assets...
From GitHub Releases REST API:
{
"url": "https://api.github.com/repos/moneymanagerex/moneymanagerex/releases/assets/7063594",
"id": 7063594,
"name": "mmex-1.4.0.alpha4-win64-portable.zip",
"label": "",
"uploader": {
"login": "slodki",
"id": 3155552,
"avatar_url": "https://avatars3.githubusercontent.com/u/3155552?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/slodki",
"html_url": "https://github.com/slodki",
"followers_url": "https://api.github.com/users/slodki/followers",
"following_url": "https://api.github.com/users/slodki/following{/other_user}",
"gists_url": "https://api.github.com/users/slodki/gists{/gist_id}",
"starred_url": "https://api.github.com/users/slodki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/slodki/subscriptions",
"organizations_url": "https://api.github.com/users/slodki/orgs",
"repos_url": "https://api.github.com/users/slodki/repos",
"events_url": "https://api.github.com/users/slodki/events{/privacy}",
"received_events_url": "https://api.github.com/users/slodki/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/octet-stream",
"state": "uploaded",
"size": 12642568,
"download_count": 10,
"created_at": "2018-05-04T00:06:33Z",
"updated_at": "2018-05-04T00:06:38Z",
"browser_download_url": "https://github.com/moneymanagerex/moneymanagerex/releases/download/nightly/mmex-1.4.0.alpha4-win64-portable.zip"
},
The problem is AppVeyor cannot detect if uploaded file exists at GitHub already.
script https://github.com/moneymanagerex/moneymanagerex/blob/353395573dde163aa9165aa6cf6289c11e47e9eb/.appveyor.yml#L198 build log https://ci.appveyor.com/project/moneymanagerex/moneymanagerex/build/job/y7wo9wfsoluwx9iu#L480