From a39af0766f82797d54aaf58fe7b0098bfa3cbcd1 Mon Sep 17 00:00:00 2001 From: Alexandru Macocian Date: Wed, 2 Jun 2021 13:13:26 +0200 Subject: [PATCH] Introduce CI&CD pipelines --- .github/workflows/cd.yaml | 63 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 43 ++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 .github/workflows/cd.yaml create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..0685914 --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,63 @@ +name: WpfExtended CD Pipeline + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + + build: + environment: Default + strategy: + matrix: + targetplatform: [x64] + + runs-on: windows-latest + + env: + Configuration: Release + Solution_Path: WpfExtended.sln + Test_Project_Path: Slim.Tests\Slim.Tests.csproj + Source_Project_Path: Slim\Slim.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: '5.0.202' + + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.1 + + - name: Restore Projects + run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier + env: + RuntimeIdentifier: win-${{ matrix.targetplatform }} + + - name: Build WpfExtended project + run: dotnet build WpfExtended -c $env:Configuration + + - name: Push nuget package + uses: brandedoutcast/publish-nuget@v2.5.5 + with: + PROJECT_FILE_PATH: WpfExtended\WpfExtended.csproj + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: Build WpfExtended.SourceGeneration project + run: dotnet build WpfExtended.SourceGeneration -c $env:Configuration + + - name: Push nuget package + uses: brandedoutcast/publish-nuget@v2.5.5 + with: + PROJECT_FILE_PATH: WpfExtended.SourceGeneration\WpfExtended.SourceGeneration.csproj + NUGET_KEY: ${{secrets.NUGET_API_KEY}} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..8d3ee90 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,43 @@ +name: WpfExtended CI Pipeline + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + + build: + + strategy: + matrix: + targetplatform: [x64] + + runs-on: windows-latest + + env: + Solution_Path: WpfExtended.sln + 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: '5.0.202' + + - 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: + Configuration: Debug + RuntimeIdentifier: win-${{ matrix.targetplatform }} \ No newline at end of file