-
Notifications
You must be signed in to change notification settings - Fork 48
40 lines (34 loc) · 1.21 KB
/
nuget-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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