-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (34 loc) · 1.07 KB
/
sdk-csharp-nuget.yml
File metadata and controls
45 lines (34 loc) · 1.07 KB
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
41
42
43
44
45
name: StarFederation.Datastar Nuget
on:
workflow_dispatch:
env:
NuGetDirectory: ${{ github.workspace }}/nuget
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build and Pack NuGet package with versioning
run: dotnet pack src/csharp/StarFederation.Datastar.csproj --configuration Release --output ${{ env.NuGetDirectory }}
- name: Upload NuGet package to GitHub
uses: actions/upload-artifact@v4
with:
name: nugetPackage
path: ${{ env.NuGetDirectory }}/*.nupkg
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download nuget package artifact
uses: actions/download-artifact@v4
with:
name: nugetPackage
path: nugetPackage
- name: Publish to NuGet.org
run: dotnet nuget push nugetPackage/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate