File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ env :
9
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
10
+ DOTNET_CLI_TELEMETRY_OPTOUT : true
11
+
12
+ jobs :
13
+ release :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Setup .NET
21
+ uses : actions/setup-dotnet@v4
22
+
23
+ - name : Extract version from tag
24
+ id : extract_version
25
+ run : echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
26
+
27
+ - name : Restore dependencies
28
+ run : dotnet restore
29
+
30
+ - name : Build solution
31
+ run : dotnet build --configuration Release --no-restore
32
+
33
+ - name : Package
34
+ run : dotnet pack ./Serilog.Sinks.Network/Serilog.Sinks.Network.csproj -c Release -o ./artifacts /p:Version=${{ steps.extract_version.outputs.version }}
35
+
36
+ - name : Publish To NuGet
37
+ env :
38
+ NUGET_KEY : ${{ secrets.NUGET_KEY }}
39
+ run : dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGET_KEY }}
You can’t perform that action at this time.
0 commit comments