-
-
Notifications
You must be signed in to change notification settings - Fork 41
58 lines (41 loc) · 1.37 KB
/
release.yml
File metadata and controls
58 lines (41 loc) · 1.37 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
55
56
57
name: Release
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
publish:
name: Build & Publish Packages
runs-on: windows-latest
environment:
name: production
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0
- name: Setup NuGet CLI
uses: NuGet/setup-nuget@v4
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release -p:ContinuousIntegrationBuild=true --no-restore
- name: Pack regular packages
run: dotnet pack --configuration Release --no-build --output ./artifacts
- name: Pack meta packages
working-directory: Packages
run: |
nuget pack GenHTTP.Core.nuspec -OutputDirectory ../artifacts
nuget pack GenHTTP.Core.Kestrel.nuspec -OutputDirectory ../artifacts
- name: List gathered packages
run: dir artifacts
- name: Publish packages to NuGet
working-directory: artifacts
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push *.nupkg --api-key "$env:NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate