philippgille / hello-netcoreapp

Basic .NET Core console application with additional scripts and files for building the app and creating release artifacts for a framework-dependent deployment, self-contained deployment, Docker image, Chocolatey package and AppImage
GNU General Public License v3.0
6 stars 5 forks source link

Automatically add AppImage to GitHub Releases #9

Closed philippgille closed 7 years ago

philippgille commented 7 years ago

Automatically add AppImage (built on Travis CI) to GitHub Releases, which gets created by AppVeyor.

Requires a GitHub Release to be updateable after creation. You can do this manually with the GitHub UI, so it should be possible programmatically as well.

philippgille commented 7 years ago

Only possible after #8

philippgille commented 7 years ago

For uploading to GitHub Releases, see Travis CI docs - GitHub Releases Uploading. The additions in the .travis.yml should look like:

deploy:
  provider: releases
  api_key:
    secure: YOUR_API_KEY_ENCRYPTED
  file: "FILE TO UPLOAD"
  skip_cleanup: true
  on:
    tags: true
philippgille commented 7 years ago

If the aforementioned Travis CI configuration addition only creates a release and can't be used to add a file to a release, maybe it has to be done manually.

See this documentation about how to do it manually: https://developer.github.com/v3/repos/releases/#create-a-release

Related to #15

Possible problem (in any case): What if the Travis CI build runs before the AppVeyor build and there's no release yet where files can be added?

philippgille commented 7 years ago

I tried a different way: Execute build-with-docker.ps1 and build.ps1 in AppVeyor, because the AppImage gets built in the first script. But it didn't work because the Docker daemon on the Windows Server 2016 VM that AppVeyor uses (when using the image Visual Studio 2017, which I don't need for building hello-netcoreapp, but is the only one running on Windows Server 2016, which is the only OS that AppVeyor provides that supports Docker) is configured to run Windows containers and switching the container type apparently doesn't work yet (I tried it). I created ticket appveyor/ci#1717 for that.