From 45df95db2cadf93a122bb9f9b5eede27658b4a2e Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Sun, 5 Nov 2023 13:44:24 +0900 Subject: [PATCH] Update GHA workflow --- .github/workflows/azure-dev.yaml | 55 ++++---------------------------- 1 file changed, 6 insertions(+), 49 deletions(-) diff --git a/.github/workflows/azure-dev.yaml b/.github/workflows/azure-dev.yaml index 598659d..287d484 100644 --- a/.github/workflows/azure-dev.yaml +++ b/.github/workflows/azure-dev.yaml @@ -25,11 +25,7 @@ jobs: build-test: name: Build Test - strategy: - matrix: - os: [ 'ubuntu-latest', 'windows-latest' ] - - runs-on: ${{ matrix.os }} + runs-on: 'ubuntu-latest' steps: - name: Checkout @@ -41,66 +37,27 @@ jobs: dotnet-version: 8.x dotnet-quality: 'preview' - - name: Add msbuild to PATH - if: matrix.os == 'windows-latest' - uses: microsoft/setup-msbuild@v1 - with: - msbuild-architecture: 'x64' - - - name: Setup NuGet package - if: matrix.os == 'windows-latest' - uses: nuget/setup-nuget@v1 - with: - nuget-version: '5.x' - - - name: Restore NuGet packages - Ubuntu - if: matrix.os == 'ubuntu-latest' + - name: Restore NuGet packages shell: bash run: | dotnet restore YouTubeSummariser.sln - - name: Restore NuGet packages - Windows - if: matrix.os == 'windows-latest' - shell: pwsh - run: | - nuget restore YouTubeSummariserWin.sln - - - name: Build solution - Ubuntu - if: matrix.os == 'ubuntu-latest' + - name: Build solution shell: bash run: | dotnet build YouTubeSummariser.sln -c Release - - name: Build solution - Windows - if: matrix.os == 'windows-latest' - shell: pwsh - run: | - msbuild YouTubeSummariserWin.sln /p:Configuration=Release - - - name: Test solution - Ubuntu - if: matrix.os == 'ubuntu-latest' + - name: Test solution shell: bash run: | dotnet test YouTubeSummariser.sln -c Release - # - name: Test solution - Windows - # if: matrix.os == 'windows-latest' - # shell: pwsh - # run: | - # dotnet test YouTubeSummariserWin.sln -c Release - - - name: Create artifacts - Ubuntu - if: matrix.os == 'ubuntu-latest' && (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' + - name: Create artifacts + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' shell: bash run: | dotnet publish YouTubeSummariser.sln -c Release - # - name: Create artifacts - Windows - # if: matrix.os == 'windows-latest' && (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' - # shell: pwsh - # run: | - # dotnet publish YouTubeSummariserWin.sln -c Release - - name: Upload artifact - API if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v3