1- name : Build Project
1+ name : Build
22
33env :
4+ DOTNET_NOLOGO : true
5+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
46 ASPNETCORE_ENVIRONMENT : github
57 BUILD_PATH : ' ${{github.workspace}}/artifacts'
6- BUILD_VERSION : ' 10.1.${{github.run_number}}'
7- BUILD_INFORMATION : ' 10.1.${{github.run_number}}+Branch.${{github.ref_name}}.Sha.${{github.sha}}'
88 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
99
1010on :
6161 run : dotnet restore
6262
6363 - name : Build Solution
64- run : dotnet build --no-restore --configuration Release -p:Version="${{env.BUILD_VERSION}}" -p:InformationalVersion="${{env.BUILD_INFORMATION}}"
65-
64+ run : dotnet build --no-restore --configuration Release
65+
6666 - name : Run Test
6767 run : dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
6868
8282
8383 - name : Create Packages
8484 if : success() && github.event_name != 'pull_request'
85- run : dotnet pack --configuration Release --include-symbols --include-source --no-build --no-restore --output "${{env.BUILD_PATH}}" -p:PackageVersion="${{env.BUILD_VERSION}}"
85+ run : dotnet pack --configuration Release --include-symbols --include-source --no-build --no-restore --output "${{env.BUILD_PATH}}"
8686
8787 - name : Upload Packages
8888 if : success() && github.event_name != 'pull_request'
@@ -91,19 +91,36 @@ jobs:
9191 name : packages
9292 path : ' ${{env.BUILD_PATH}}'
9393
94- - name : Publish Packages
95- if : success() && github.event_name != 'pull_request'
94+ deploy :
95+ runs-on : ubuntu-latest
96+ needs : build
97+ if : success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
98+
99+ steps :
100+ - name : Download Artifact
101+ uses : actions/download-artifact@v3
102+ with :
103+ name : packages
104+
105+ - name : Publish Packages GitHub
96106 run : |
97- dotnet nuget add source --username pwelter34 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/loresoft/index.json"
98107 for package in $(find -name "*.nupkg"); do
99108 echo "${0##*/}": Pushing $package...
100- dotnet nuget push $package --source " github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
109+ dotnet nuget push $package --source https://nuget.pkg. github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
101110 done
102111
103- - name : Publish Release Packages
104- if : success() && startsWith(github.ref, 'refs/tags/v')
112+ - name : Publish Packages feedz
113+ run : |
114+ for package in $(find -name "*.nupkg"); do
115+ echo "${0##*/}": Pushing $package...
116+ dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
117+ done
118+
119+ - name : Publish Packages Nuget
120+ if : startsWith(github.ref, 'refs/tags/v')
105121 run : |
106122 for package in $(find -name "*.nupkg"); do
107123 echo "${0##*/}": Pushing $package...
108124 dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
109125 done
126+
0 commit comments