Skip to content

Commit

Permalink
Update GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo committed Nov 5, 2023
1 parent e27c138 commit 45df95d
Showing 1 changed file with 6 additions and 49 deletions.
55 changes: 6 additions & 49 deletions .github/workflows/azure-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 45df95d

Please sign in to comment.