Skip to content

Instantly share code, notes, and snippets.

@martinabrahams
Last active April 9, 2018 00:23
Show Gist options
  • Save martinabrahams/806420b03c26c3e6801070ab75fe8c11 to your computer and use it in GitHub Desktop.
Save martinabrahams/806420b03c26c3e6801070ab75fe8c11 to your computer and use it in GitHub Desktop.
Build dotnet core 2 project and package as Elastic Beanstalk artifact
image: Visual Studio 2017
before_build:
- dotnet restore
build_script:
# use dotnet CLI to publish to subfolder named site
- dotnet publish -o site
after_build:
# zip dotnet build output
- 7z a site.zip .\site\*
# create new zip containing site.zip and the aws deploy manifest
- 7z a deploy.zip site.zip aws-windows-deployment-manifest.json
# push deploy.zip as artifact
- ps: Push-AppveyorArtifact deploy.zip -DeploymentName deploypackage -Type ElasticBeanstalkPackage
{
"manifestVersion": 1,
"deployments": {
"aspNetCoreWeb": [
{
"name": "test-dotnet-core",
"parameters": {
"appBundle": "site.zip",
"iisPath": "/",
"iisWebSite": "Default Web Site"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment