File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test Publish Code
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : ' Version'
8
+ required : true
9
+
10
+ jobs :
11
+ publish :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+
17
+ - name : Setup .NET
18
+ uses : actions/setup-dotnet@v1
19
+ with :
20
+ dotnet-version : 5.0.x
21
+ source-url : https://api.nuget.org/v3/index.json
22
+ env :
23
+ NUGET_AUTH_TOKEN : ${{secrets.NUGET_API_KEY}}
24
+
25
+ - name : Install dependencies
26
+ run : |
27
+ dotnet restore
28
+
29
+ - name : Build solution [Release]
30
+ run : dotnet build --no-restore -c Release
31
+
32
+ - name : Test
33
+ run : dotnet test -c Release --no-build --verbosity normal
34
+
35
+ - name : Pack solution [Release]
36
+ run : |
37
+ dotnet pack --no-restore --no-build -o PackOutputs -c Release -p:Version=${{ github.event.inputs.version }} -p:PackageReleaseNotes="See https://github.com/notion-dotnet/notion-sdk-net/releases/tag/${{ github.event.inputs.version }}" -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
38
+ echo 'Generated Packages'
39
+ ls -l PackOutputs/
40
+ rm -f PackOutputs/*.nupkg
41
+ echo 'Packages After Removing nupkg'
42
+ ls -l PackOutputs/
43
+ dotnet pack --no-restore --no-build -o PackOutputs -c Release -p:Version=${{ github.event.inputs.version }} -p:PackageReleaseNotes="See https://github.com/notion-dotnet/notion-sdk-net/releases/tag/${{ github.event.inputs.version }}" -p:PackageReadmeFile=README.md
44
+ echo 'Final Packages'
45
+ ls -l PackOutputs/
46
+
47
+ - name : Upload artifacts
48
+ uses : actions/upload-artifact@v2
49
+ with :
50
+ name : Notion.Net
51
+ path : PackOutputs/*
You can’t perform that action at this time.
0 commit comments