Closed rgleason closed 5 years ago
We, after horsing around with a new security key, reapplying the security settings in git, moving and simplifying parts of appveyor.yml there is finally a file from Artifacts that lands in the Git Release area as a release! I was about to quit.
Uploading "weatherfax_pi-1.9.3-ov42-win32.exe" to release assets...OK
Build success
I have commented out the tag: $(appveyor_repo_tag_name) and (appveyor_repo_tag):true which create the version number and deploy on tag push only.
This is the appveyor.yml file used for weatherfax_pi at this point, will push every new file up to Release. The security token used is encrypted by yaml and can only be used on my repository. appveyor.yml.txt
Next step is to get the version number correct and deploy on tag push only working. However those worked before but the file did not get pushed due to an authentication error. I'd like to end up with green checks for both conditions (tag pushed to release or not)
This painful exercise has also forced me to learn how to use git rebase -i HEAD~ some number of lines which is good.
The appveyor forum discussion has more detailed notes at the bottom of my post. https://help.appveyor.com/discussions/problems/23134-push-built-file-to-opensource-public-github-release
During this process I had to consider this to, and worked around it with a new branch. Git branch --delete and Git Squash -Effect on Appveyor
Uncommented these lines in appveyor.yml:
tag: $(APPVEYOR_REPO_TAG_NAME) # insert version name APPVEYOR_REPO_TAG: true # deploy on tag push only
Then pushed appveyor.yml to remote. Then pushed a new tag to remote with:
git tag v1.9.3-ov42-test git push origin v1.9.3-ov42-test
upon which a new Release & Tag "v1.9.3-ov42-test" gets created which now contains the results of the Appveyor build under "Assets" find "weatherfax_pi-1.9.3-ov42-win32.exe". See https://github.com/rgleason/weatherfax_pi/releases/tag/v1.9.3-ov42-test
The Appveyor Console shows: https://ci.appveyor.com/project/rgleason/weatherfax-pi
Collecting artifacts...
Found artifact 'build\weatherfax_pi-1.9.3-ov42-win32.exe' matching 'build\*.exe' path
Uploading artifacts...
[1/1] build\weatherfax_pi-1.9.3-ov42-win32.exe (721,873 bytes)...100%
Deploying using GitHub provider
Creating "v1.9.3-ov42-test" release for repository "rgleason/weatherfax_pi" tag "v1.9.3-ov42-test" commit "05b6418e674b7d722424146c8efe2745a88b635b"...OK
Uploading "weatherfax_pi-1.9.3-ov42-win32.exe" to release assets...OK
Build success
This is the appveyor.yml that is used used currently (it may change a little) appveyor.yml.txt
For more information about setting the auth_token security please read the notes made in appveyor discussions: *Push built Artifact .exe to Github "Release" (opensource, public repos, dev account)** See Post 13 Posted by fcgleason on Apr 23, 2019 @ 09:31 PM Also see Git branch --delete and Git Squash -Effect on Appveyor might be useful.
I am going to make a another new branch "deploy-win3" and clean up with git rebase -i HEAD~xxx Then make a PR to Sean. To get this working Sean will have to add his own encrypted auth_token.
This ov42 appveyor file will still work to create Artifacts, even if the auth_token is not changed.
I've been getting this result:
It is obvious now that authorization keys are not set up correctly. Pushing to remote Git repository from a build
Also useful Publishing to github releases - Provider settings
Under my github account user > settings > developer (at the bottom) there are 3 selections
Some notes from a user:
Bottom of the users appveyor, similar to mine.