Skip to content

Commit 6bf7fc1

Browse files
Add package tools to manifest (#2084)
- Add dotnet-validate and sign to the tools manifest so that dependabot can update them if there's newer versions released, and then reference that version in the build workflow. - Bump version to 8.4 for the next release.
1 parent 08d7bc4 commit 6bf7fc1

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

.config/dotnet-tools.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,29 @@
88
"dotnet-cake"
99
]
1010
},
11+
"docfx": {
12+
"version": "2.75.3",
13+
"commands": [
14+
"docfx"
15+
]
16+
},
17+
"dotnet-validate": {
18+
"version": "0.0.1-preview.304",
19+
"commands": [
20+
"dotnet-validate"
21+
]
22+
},
1123
"markdownsnippets.tool": {
1224
"version": "27.0.2",
1325
"commands": [
1426
"mdsnippets"
1527
]
1628
},
17-
"docfx": {
18-
"version": "2.75.3",
29+
"sign": {
30+
"version": "0.9.1-beta.23530.1",
1931
"commands": [
20-
"docfx"
32+
"sign"
2133
]
2234
}
2335
}
24-
}
36+
}

.github/workflows/build.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131

3232
outputs:
3333
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}
34+
dotnet-sign-version: ${{ steps.get-dotnet-tools-versions.outputs.dotnet-sign-version }}
35+
dotnet-validate-version: ${{ steps.get-dotnet-tools-versions.outputs.dotnet-validate-version }}
3436

3537
strategy:
3638
fail-fast: false
@@ -110,6 +112,16 @@ jobs:
110112
path: eng/signing
111113
if-no-files-found: error
112114

115+
- name: Get .NET tools versions
116+
id: get-dotnet-tools-versions
117+
shell: pwsh
118+
run: |
119+
$manifest = (Get-Content "./.config/dotnet-tools.json" | Out-String | ConvertFrom-Json)
120+
$dotnetSignVersion = $manifest.tools.sign.version
121+
$dotnetValidateVersion = $manifest.tools.'dotnet-validate'.version
122+
"dotnet-sign-version=${dotnetSignVersion}" >> $env:GITHUB_OUTPUT
123+
"dotnet-validate-version=${dotnetValidateVersion}" >> $env:GITHUB_OUTPUT
124+
113125
validate-packages:
114126
needs: build
115127
runs-on: ubuntu-latest
@@ -127,8 +139,10 @@ jobs:
127139

128140
- name: Validate NuGet packages
129141
shell: pwsh
142+
env:
143+
DOTNET_VALIDATE_VERSION: ${{ needs.build.outputs.dotnet-validate-version }}
130144
run: |
131-
dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
145+
dotnet tool install --global dotnet-validate --version ${env:DOTNET_VALIDATE_VERSION}
132146
$packages = Get-ChildItem -Filter "*.nupkg" | ForEach-Object { $_.FullName }
133147
$invalidPackages = 0
134148
foreach ($package in $packages) {
@@ -168,7 +182,9 @@ jobs:
168182
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}
169183

170184
- name: Install Sign CLI tool
171-
run: dotnet tool install --tool-path . sign --version 0.9.1-beta.23530.1
185+
env:
186+
DOTNET_SIGN_VERSION: ${{ needs.build.outputs.dotnet-sign-version }}
187+
run: dotnet tool install --tool-path . sign --version ${env:DOTNET_SIGN_VERSION}
172188

173189
- name: Sign artifacts
174190
shell: pwsh
@@ -212,8 +228,10 @@ jobs:
212228

213229
- name: Validate NuGet packages
214230
shell: pwsh
231+
env:
232+
DOTNET_VALIDATE_VERSION: ${{ needs.build.outputs.dotnet-validate-version }}
215233
run: |
216-
dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
234+
dotnet tool install --global dotnet-validate --version ${env:DOTNET_VALIDATE_VERSION}
217235
$packages = Get-ChildItem -Filter "*.nupkg" | ForEach-Object { $_.FullName }
218236
$invalidPackages = 0
219237
foreach ($package in $packages) {

eng/Common.targets

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
</ItemGroup>
2020

2121
<PropertyGroup Label="MinVer">
22-
<MinVerMinimumMajorMinor>8.3</MinVerMinimumMajorMinor>
22+
<MinVerMinimumMajorMinor>8.4</MinVerMinimumMajorMinor>
2323
</PropertyGroup>
2424

2525
<Target Name="CustomizeVersions" AfterTargets="MinVer" Condition="'$(GITHUB_ACTIONS)' == 'true'">
2626
<PropertyGroup>
27-
<FileVersion>$([MSBuild]::ValueOrDefault('$(MinVerMajor)', '8')).$([MSBuild]::ValueOrDefault('$(MinVerMinor)', '3')).$([MSBuild]::ValueOrDefault('$(MinVerPatch)', '0')).$(GITHUB_RUN_NUMBER)</FileVersion>
27+
<FileVersion>$([MSBuild]::ValueOrDefault('$(MinVerMajor)', '8')).$([MSBuild]::ValueOrDefault('$(MinVerMinor)', '4')).$([MSBuild]::ValueOrDefault('$(MinVerPatch)', '0')).$(GITHUB_RUN_NUMBER)</FileVersion>
2828
</PropertyGroup>
2929
<PropertyGroup Condition="$(GITHUB_REF.StartsWith(`refs/pull/`))">
3030
<PackageVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)-pr.$(GITHUB_REF_NAME.Replace(`/merge`, ``)).$(GITHUB_RUN_NUMBER)</PackageVersion>

0 commit comments

Comments
 (0)