HybridWebView Publish to nuget.org #14
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
name: HybridWebView Publish to nuget.org | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ${{ matrix.os }} | |
env: | |
DOTNET_NOLOGO: true | |
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
steps: | |
- name: Clone source | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Install .NET 8 SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.100 | |
- name: Install MAUI Workload | |
run: dotnet workload install maui --ignore-failed-sources | |
- name: "Restore NuGet packages" | |
run: dotnet restore /p:Configuration=Release MauiCSharpInteropWebView.sln | |
- name: "Build and pack HybridWebView" | |
run: dotnet pack /p:Configuration=Release HybridWebView/HybridWebView.csproj | |
- name: "Publish NuGet packages to nuget.org" | |
run: | | |
nuget push "artifacts\*.nupkg" -SkipDuplicate -ApiKey $env:NUGET_AUTH_TOKEN -Source https://api.nuget.org/v3/index.json | |
nuget push "artifacts\*.snupkg" -SkipDuplicate -ApiKey $env:NUGET_AUTH_TOKEN -Source https://api.nuget.org/v3/index.json |