v2.1.6 #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "develop", "release", "master" ] | |
pull_request: | |
branches: [ "release", "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/setup-nuget@v1.0.5 | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Restore Packages | |
run: nuget restore Framework.sln | |
- name: Build solution | |
run: msbuild Framework.sln -t:rebuild -property:Configuration=Release | |
- name: Unit Tests (develop branch) | |
if: github.event.ref == 'refs/heads/develop' | |
run: | | |
msbuild -t:test | |
- name: Unit Tests (release branch) | |
if: github.event.ref == 'refs/heads/release' | |
run: | | |
msbuild -t:test | |
- name: Nuget pack (develop branch) | |
if: github.event.ref == 'refs/heads/develop' | |
run: | | |
msbuild -t:pack | |
- name: Nuget pack (release branch) | |
if: github.event.ref == 'refs/heads/release' | |
run: | | |
nuget pack Framework\Framework.csproj -NonInteractive -Verbosity detailed -SolutionDirectory . -OutputDirectory Framework\bin\release | |
- name: Nuget pack (master branch) | |
if: github.event.ref == 'refs/heads/master' | |
run: | | |
nuget pack Framework\Framework.csproj -NonInteractive -SolutionDirectory . -OutputDirectory Framework\bin\release | |
- name: NuGet package publish (master branch) | |
if: github.event.ref == 'refs/heads/master' | |
run: | | |
dotnet nuget push Framework\bin\Release\BOG.Framework.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ vars.NUGET_SOURCE }} --skip-duplicate | |