@@ -72,10 +72,11 @@ jobs:
7272
7373 # Create the NuGet package in the folder from the environment variable NuGetDirectory
7474 - run : |
75- dotnet pack -c release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true
76- dotnet pack src/bunit/ -c release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true
77- dotnet pack src/bunit.template/ -c release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true
78- dotnet pack src/bunit.generators/ -c release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true
75+ dotnet pack src/bunit/ -c Release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true -p:publicrelease=true
76+ dotnet pack src/bunit.core/ -c Release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true -p:publicrelease=true
77+ dotnet pack src/bunit.web/ -c Release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true -p:publicrelease=true
78+ dotnet pack src/bunit.template/ -c Release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true -p:publicrelease=true
79+ dotnet pack src/bunit.generators/ -c release --output ${{ env.NUGET_DIRECTORY }} -p:ContinuousIntegrationBuild=true -p:publicrelease=true
7980
8081 # Publish the NuGet package as an artifact, so they can be used in the following jobs
8182 - uses : actions/upload-artifact@v3
@@ -108,6 +109,25 @@ jobs:
108109 shell : pwsh
109110 run : meziantou.validate-nuget-package (Get-ChildItem "${{ env.NUGET_DIRECTORY }}/*.nupkg") --excluded-rules IconMustBeSet
110111
112+ release-preview :
113+ if : github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2'
114+ runs-on : ubuntu-latest
115+ needs : [ validate-nuget, run-test, validate_template, validate-docs ]
116+ steps :
117+ - uses : actions/download-artifact@v3
118+ with :
119+ name : ${{ env.NUGET_PACKAGES_ARTIFACT }}
120+ path : ${{ env.NUGET_DIRECTORY }}
121+
122+ - name : Setup .NET Core
123+ uses : actions/setup-dotnet@v4
124+
125+ - name : 🛠️ Upload library to GitHub Package Repository
126+ run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bunit-dev/index.json --skip-duplicate --no-symbols
127+
128+ - name : 🛠️ Upload library to NuGet.org repository
129+ run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
130+
111131 run-test :
112132 strategy :
113133 fail-fast : false
@@ -241,22 +261,3 @@ jobs:
241261 uses : actions/checkout@v4
242262 - name : ' Dependency Review'
243263 uses : actions/dependency-review-action@v3
244-
245- release-preview :
246- if : github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2'
247- runs-on : ubuntu-latest
248- needs : [ validate-nuget, run-test, validate_template, validate-docs ]
249- steps :
250- - uses : actions/download-artifact@v3
251- with :
252- name : ${{ env.NUGET_PACKAGES_ARTIFACT }}
253- path : ${{ env.NUGET_DIRECTORY }}
254-
255- - name : Setup .NET Core
256- uses : actions/setup-dotnet@v4
257-
258- - name : 🛠️ Upload library to GitHub Package Repository
259- run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bunit-dev/index.json --skip-duplicate --no-symbols
260-
261- - name : 🛠️ Upload library to NuGet.org repository
262- run : dotnet nuget push ${{ env.NUGET_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
0 commit comments