Skip to content

v2.1.6

v2.1.6 #17

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