mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-22 18:29:31 +00:00
0fe9f9957c
* Setup OAuth2 support * Setup tests project * Setup OAuth2 unit tests in CI pipeline * Setup authorizeattribute tests * Test * Setup tests for AuthorizeAttribute * Setup OAuth2 support Unit Tests coverage * Add OAuth2 project to release
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: MTSC CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
environment: Default
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x64]
|
|
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
Configuration: Release
|
|
Solution_Path: MTSC.sln
|
|
Test_Project_Path: MTSC.UnitTests\MTSC.UnitTests.csproj
|
|
Source_Project_Path: MTSC\MTSC.csproj
|
|
Oauth_Project_Path: MTSC.OAuth2\MTSC.OAuth2.csproj
|
|
Actions_Allow_Unsecure_Commands: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install .NET Core
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: '6.0.x'
|
|
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.0.1
|
|
|
|
- name: Restore project
|
|
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier
|
|
env:
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
|
|
|
- name: Build MTSC project
|
|
run: dotnet build MTSC -c $env:Configuration
|
|
|
|
- name: Package MTSC
|
|
run: dotnet pack -c Release -o . $env:Source_Project_Path
|
|
|
|
- name: Package MTSC.OAuth2
|
|
run: dotnet pack -c Release -o . $env:Oauth_Project_Path
|
|
|
|
- name: Publish
|
|
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
|