-
-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (35 loc) · 1.03 KB
/
Copy pathrelease.yml
File metadata and controls
38 lines (35 loc) · 1.03 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
name: Publish Packages to nuget
on:
release:
types: [created]
jobs:
build:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Setup .NET Core
uses: actions/setup-dotnet@v4.2.0
with:
dotnet-version: |
7.0
8.0
9.0
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.0
with:
path: RDMSharp/bin/Release/**/RDMSharp.dll
- name: Create Nuget Package
run: dotnet pack --configuration Release
- name: Nuget login (OIDC → temp API key)
uses: Nuget/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Upload to Nuget.org
run: dotnet nuget push RDMSharp/bin/Release/RDMSharp.*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json