-
-
Notifications
You must be signed in to change notification settings - Fork 1
25 lines (21 loc) · 766 Bytes
/
publish.yml
File metadata and controls
25 lines (21 loc) · 766 Bytes
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
name: Publish to Nuget
on:
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -p:Configuration=Release
- name: Publish to NuGet
run: dotnet nuget push "/home/runner/work/WindowsAppCommunity.Sdk/WindowsAppCommunity.Sdk/src/bin/Release/WindowsAppCommunity.Sdk.*.*.*.nupkg" --skip-duplicate --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json