Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CalvinAllen/efdc537796039ef624d4966396e33391 to your computer and use it in GitHub Desktop.
Save CalvinAllen/efdc537796039ef624d4966396e33391 to your computer and use it in GitHub Desktop.
name: EZRep Build
on:
push:
tags: releases/[1-9]+.[0-9]+.[0-9]+
branches: master
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Create Build Directory
run: mkdir _build
- name: Restore Packages
run: nuget restore EzRep.sln
- name: Build Solution
run: |
msbuild.exe EzRep.sln /nologo /nr:false /p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release" /p:PublishUrl="../_build"
- name: Upload artifact
uses: actions/[email protected]
with:
name: EZRepBundle
path: "./_build"
- name: Login to Azure
if: startsWith( github.ref, 'refs/tags/releases/')
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Publish Artifacts to Azure
if: startsWith( github.ref, 'refs/tags/releases/')
uses: Azure/webapps-deploy@v2
with:
app-name: ezrep
package: "./_build"
slot-name: production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment