-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.18 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (43 loc) · 1.18 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
46
47
48
49
50
51
52
53
54
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build
- name: Pack
run: dotnet pack -c Release -o ./artifacts --no-build
- name: Login to NuGet (Trusted Publishing / OIDC)
uses: NuGet/login@v1
id: nuget-login
with:
user: kemaltaskin
- name: Push to nuget.org
run: >
dotnet nuget push ./artifacts/*.nupkg
--api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
--source https://api.nuget.org/v3/index.json
--skip-duplicate
- name: Attach packages to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
./artifacts/*.nupkg
./artifacts/*.snupkg
generate_release_notes: true