File tree Expand file tree Collapse file tree 2 files changed +44
-37
lines changed Expand file tree Collapse file tree 2 files changed +44
-37
lines changed Original file line number Diff line number Diff line change 1- name : .NET
1+ name : .NET build and test
22
33on :
44 push :
2727 - name : " Build & test"
2828 run : |
2929 echo "done!"
30- pwd
31-
32- publish :
33- runs-on : ubuntu-latest
34- needs : build
35- steps :
36- - uses : actions/checkout@v2
37- - name : Setup .NET
38- uses : actions/setup-dotnet@v1
39- with :
40- dotnet-version : 6.0.x
41- - name : Restore dependencies
42- run : dotnet restore
43- - name : Build
44- run : dotnet build --configuration Release --no-restore
45- - name : Publish
46- run : dotnet publish --configuration Release --no-restore
47- - name : NugetPush
48- run : |
49- ls
50- ls ./GithubActionsHelloWorld/bin/Release
51- dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.*nupkg --skip-duplicate --no-symbols false --api-key ${{secrets.NUGET_TOKEN}} --source https://int.nugettest.org/
52- - uses : papeloto/action-zip@v1
53- with :
54- files : ./GithubActionsHelloWorld/bin/Release/net6.0/publish/
55- dest : GithubActionsHelloWorld.zip
56- - uses : " marvinpinto/action-automatic-releases@latest"
57- with :
58- repo_token : " ${{ secrets.GITHUB_TOKEN }}"
59- automatic_release_tag : " latest"
60- prerelease : true
61- title : " Development Build"
62- files : |
63- LICENSE
64- GithubActionsHelloWorld.zip
65-
30+ pwd
Original file line number Diff line number Diff line change 1+ name : .NET publish
2+
3+ on :
4+ workflow_run :
5+ workflows : [ .NET build and test ]
6+ branches : [ main, automated-nuget.org-publish ]
7+ types : [ completed ]
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ needs : build
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup .NET
16+ uses : actions/setup-dotnet@v1
17+ with :
18+ dotnet-version : 6.0.x
19+ - name : Restore dependencies
20+ run : dotnet restore
21+ - name : Build
22+ run : dotnet build --configuration Release --no-restore
23+ - name : Publish
24+ run : dotnet publish --configuration Release --no-restore
25+ - name : NugetPush
26+ run : |
27+ ls ./GithubActionsHelloWorld/bin/Release
28+ dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.*nupkg --skip-duplicate --include-symbols -p:SymbolPackageFormat=snupkg --api-key ${{secrets.NUGET_TOKEN}} --source https://int.nugettest.org/
29+ - uses : papeloto/action-zip@v1
30+ with :
31+ files : ./GithubActionsHelloWorld/bin/Release/net6.0/publish/
32+ dest : GithubActionsHelloWorld.zip
33+ - uses : " marvinpinto/action-automatic-releases@latest"
34+ with :
35+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
36+ automatic_release_tag : " latest"
37+ prerelease : true
38+ title : " Development Build"
39+ files : |
40+ LICENSE
41+ GithubActionsHelloWorld.zip
42+
You can’t perform that action at this time.
0 commit comments