Skip to content

Commit 5961810

Browse files
Add release pipeline
1 parent f6c9f6f commit 5961810

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
12+
publish:
13+
14+
name: Build & Publish Packages
15+
runs-on: ubuntu-latest
16+
17+
environment:
18+
name: production
19+
20+
steps:
21+
22+
- name: Checkout source
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup .NET 9 SDK
28+
uses: actions/setup-dotnet@v4
29+
with:
30+
dotnet-version: 9.0
31+
32+
- name: Restore dependencies
33+
run: dotnet restore
34+
35+
- name: Build solution
36+
run: dotnet build --configuration Release --no-restore
37+
38+
- name: Pack regular packages
39+
run: dotnet pack --configuration Release -p:ContinuousIntegrationBuild=true --no-build --output ./artifacts
40+
41+
- name: Build meta packages
42+
working-directory: Packages
43+
run: |
44+
nuget pack GenHTTP.Core.nuspec -OutputDirectory ../artifacts
45+
nuget pack GenHTTP.Core.Kestrel.nuspec -OutputDirectory ../artifacts
46+
47+
- name: List gathered packages
48+
run: ls -l artifacts
49+
50+
#- name: Publish packages to NuGet
51+
# env:
52+
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
53+
# run: |
54+
# for pkg in artifacts/*.nupkg; do
55+
# echo "Publishing $pkg..."
56+
# dotnet nuget push "$pkg" \
57+
# --api-key "$NUGET_API_KEY" \
58+
# --source https://api.nuget.org/v3/index.json \
59+
# --skip-duplicate
60+
# don

0 commit comments

Comments
 (0)