@@ -55,10 +55,20 @@ jobs:
5555 with :
5656 setAllVars : true
5757
58- - name : 🍥 Replace tokens in files
58+ - name : 🛠️ Get Changelog Entry
59+ id : changelog_reader
60+ uses : mindsers/changelog-reader-action@v2
61+ with :
62+ version : Unreleased
63+ path : ./CHANGELOG.md
64+
65+ - name : 🛠️ Update tokens in project files
5966 uses : cschleiden/replace-tokens@v1
6067 with :
61- files : ' ["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj"]'
68+ files : ' ["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj", "src/Directory.Build.props"]'
69+ env :
70+ RELEASE_VERSION : ${{ env.NBGV_NuGetPackageVersion }}
71+ RELEASE_NOTES : ${{ steps.changelog_reader.outputs.changes }}
6272
6373 # Create the NuGet package in the folder from the environment variable NuGetDirectory
6474 - run : |
@@ -137,6 +147,10 @@ jobs:
137147 runs-on : ubuntu-latest
138148 needs : [ create-nuget ]
139149 steps :
150+ - uses : actions/checkout@v3
151+ with :
152+ fetch-depth : 0 # Get all history to allow automatic versioning using MinVer
153+
140154 - name : Setup .NET
141155 uses : actions/setup-dotnet@v3
142156
@@ -152,32 +166,31 @@ jobs:
152166
153167 - name : ✳ Install bUnit template
154168 run : |
155- dotnet new -- install bunit.template::${NBGV_NuGetPackageVersion} --nuget-source ${{ env.NUGET_DIRECTORY }}
169+ dotnet new install bunit.template::${NBGV_NuGetPackageVersion} --nuget-source ${{ env.NUGET_DIRECTORY }}
156170
157171 - name : ✔ Verify xUnit template
158172 run : |
159173 dotnet new bunit --no-restore -o ${{ github.workspace }}/TemplateTestXunit
160174 echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestXunit/Directory.Build.props
161- dotnet restore ${{ github.workspace }}/TemplateTestXunit --source https://api.nuget.org/v3/index.json --source ${{ github.workspace }}/packages
175+ dotnet restore ${{ github.workspace }}/TemplateTestXunit --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
162176 dotnet test ${{ github.workspace }}/TemplateTestXunit
163177
164178 - name : ✔ Verify NUnit template
165179 run : |
166180 dotnet new bunit --framework nunit --no-restore -o ${{ github.workspace }}/TemplateTestNunit
167181 echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestNunit/Directory.Build.props
168- dotnet restore ${{ github.workspace }}/TemplateTestNunit --source https://api.nuget.org/v3/index.json --source ${{ github.workspace }}/packages
182+ dotnet restore ${{ github.workspace }}/TemplateTestNunit --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
169183 dotnet test ${{ github.workspace }}/TemplateTestNunit
170184
171185 - name : ✔ Verify MSTest template
172186 run : |
173187 dotnet new bunit --framework mstest --no-restore -o ${{ github.workspace }}/TemplateTestMstest
174188 echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestMstest/Directory.Build.props
175- dotnet restore ${{ github.workspace }}/TemplateTestMstest --source https://api.nuget.org/v3/index.json --source ${{ github.workspace }}/packages
189+ dotnet restore ${{ github.workspace }}/TemplateTestMstest --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
176190 dotnet test ${{ github.workspace }}/TemplateTestMstest
177191
178192 validate-docs :
179193 runs-on : ubuntu-latest
180-
181194 steps :
182195 - name : 🛒 Checkout repository
183196 uses : actions/checkout@v4
@@ -208,7 +221,7 @@ jobs:
208221 run : dotnet build
209222
210223 - name : 🧪 Run sample unit tests
211- run : dotnet test -c release docs/samples/samples.sln
224+ run : dotnet test docs/samples/samples.sln
212225
213226 - name : 📄 Build docs
214227 working-directory : ./docs/site
0 commit comments