-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,7 @@ jobs: | |
build: | ||
|
||
env: | ||
BUILD_CONFIG: 'Release' | ||
SOLUTION: 'MaterialColorUtilities.sln' | ||
CONFIGURATION: 'Release' | ||
|
||
runs-on: windows-latest | ||
|
||
|
@@ -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}} |