Skip to content

Commit

Permalink
Simplify CI
Browse files Browse the repository at this point in the history
  • Loading branch information
albi005 committed Apr 7, 2023
1 parent 2eecbe2 commit 7d8f8be
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
build:

env:
BUILD_CONFIG: 'Release'
SOLUTION: 'MaterialColorUtilities.sln'
CONFIGURATION: 'Release'

runs-on: windows-latest

Expand All @@ -35,25 +34,17 @@ jobs:
shell: pwsh

- name: Setup .NET
uses: actions/setup-dotnet@v2.0.0
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: 7.0.x
global-json-file: global.json

- name: Install .NET workloads
run: dotnet workload install maui && dotnet workload install wasm-tools

- name: Setup NuGet
uses: NuGet/[email protected]
- run: dotnet workload restore
- run: dotnet workload install maui

- name: Restore dependencies
run: nuget restore $env:SOLUTION

- name: Build
run: dotnet build $env:SOLUTION --configuration $env:BUILD_CONFIG -p:Version=$env:BUILD_VERSION --no-restore

- name: Run tests
run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal
- name: Build and run tests
run: dotnet test

- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

0 comments on commit 7d8f8be

Please sign in to comment.