Skip to content

Commit d608f51

Browse files
committed
apply updates from template
1 parent 01460b3 commit d608f51

16 files changed

+113
-32
lines changed

.github/dependabot.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,54 @@ version: 2
77
updates:
88
- package-ecosystem: "github-actions"
99
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "wednesday"
13+
time: "03:24"
14+
timezone: "Asia/Tokyo"
1015
groups:
11-
github-actions-workflows:
16+
GitHub-Actions-Workflows:
1217
patterns:
1318
- "actions/*"
14-
smdn-fundamentals-workflows:
19+
Smdn-Fundamentals-Workflows:
1520
patterns:
1621
- "smdn/Smdn.Fundamentals/*"
22+
ignore:
23+
- dependency-name: "actions/checkout"
24+
update-types:
25+
- "version-update:semver-minor"
26+
- "version-update:semver-patch"
27+
- package-ecosystem: "nuget"
28+
directory: "/"
1729
schedule:
18-
interval: "weekly"
19-
day: "wednesday"
20-
time: "03:24"
21-
timezone: "Asia/Tokyo"
30+
interval: "monthly"
31+
groups:
32+
Smdn-MSBuild-ProjectAssets:
33+
patterns:
34+
- "Smdn.MSBuild.ProjectAssets.Common"
35+
- "Smdn.MSBuild.ProjectAssets.Library"
36+
NUnit:
37+
patterns:
38+
- "NUnit*"
39+
ignore:
40+
# For "Smdn.*", only major updates should be reported.
41+
- dependency-name: "Smdn.*"
42+
update-types:
43+
- "version-update:semver-minor"
44+
- "version-update:semver-patch"
45+
# For NUnit packages, only major updates should be reported.
46+
- dependency-name: "NUnit*"
47+
update-types: # major updates only
48+
- "version-update:semver-minor"
49+
- "version-update:semver-patch"
50+
# For Microsoft's extension packages, manually update them, so ignore all of them.
51+
- dependency-name: "Microsoft.Extensions.*"
52+
update-types: # ignore all updates
53+
- "version-update:semver-major"
54+
- "version-update:semver-minor"
55+
- "version-update:semver-patch"
56+
# For other packages, only major updates should be reported.
57+
- dependency-name: "*"
58+
update-types: # major updates only
59+
- "version-update:semver-minor"
60+
- "version-update:semver-patch"

.github/workflows/codeql-analysis.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
# - cron: '07 20 03,16 * *'
2929
workflow_dispatch:
3030

31+
env:
32+
# cSpell:disable
33+
MINIMAL_DOTNET_SDK_VERSION: 10.0.100
34+
# cSpell:enable
35+
3136
# cSpell:ignore autobuild
3237
jobs:
3338
analyze:
@@ -50,7 +55,7 @@ jobs:
5055

5156
steps:
5257
- name: Checkout repository
53-
uses: actions/checkout@v5.0.1
58+
uses: actions/checkout@v6.0.1
5459

5560
- name: Initialize CodeQL
5661
uses: github/codeql-action/init@v4
@@ -66,6 +71,27 @@ jobs:
6671
if: ${{ (matrix.build-mode == 'autobuild') || (matrix.build-mode == '') }}
6772
uses: github/codeql-action/autobuild@v4
6873

74+
- name: Check .NET SDK ${{ env.MINIMAL_DOTNET_SDK_VERSION }} is installed
75+
id: dotnet-sdk-version
76+
if: ${{ (matrix.build-mode == 'manual') && (matrix.language == 'csharp') }}
77+
shell: pwsh
78+
run: |
79+
$installed_version = [System.Version]::Parse($(dotnet --version))
80+
$required_version = [System.Version]::Parse('${{ env.MINIMAL_DOTNET_SDK_VERSION }}')
81+
82+
if ( $required_version -gt $installed_version ) {
83+
# required SDK version is not installed
84+
"::notice::.NET SDK version: installed ${installed_version}, required ${required_version}"
85+
86+
"install-dotnet-sdk-version=${required_version}" >> $Env:GITHUB_OUTPUT
87+
}
88+
89+
- name: Install .NET SDK ${{ steps.dotnet-sdk-version.outputs.install-dotnet-sdk-version }}
90+
if: ${{ (matrix.build-mode == 'manual') && (matrix.language == 'csharp') && (steps.dotnet-sdk-version.outputs.install-dotnet-sdk-version != '') }}
91+
uses: actions/setup-dotnet@v5.0.1
92+
with:
93+
dotnet-version: '${{ steps.dotnet-sdk-version.outputs.install-dotnet-sdk-version }}'
94+
6995
- name: Build all .NET projects
7096
if: ${{ (matrix.build-mode == 'manual') && (matrix.language == 'csharp') }}
7197
run: |

.github/workflows/generate-release-target.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
exit 1
6262
6363
run-generate-release-target:
64-
uses: smdn/Smdn.Fundamentals/.github/workflows/generate-release-target.yml@workflows/release-target/v1.11.0
64+
uses: smdn/Smdn.Fundamentals/.github/workflows/generate-release-target.yml@workflows/release-target/v1.12.1
6565
needs: determine-release-target
6666
if: startsWith(needs.determine-release-target.outputs.tag_name, 'new-release/')
6767
with:
@@ -70,7 +70,7 @@ jobs:
7070
release_target_pr_label: 'release-target'
7171
release_tag_prefix: 'releases/'
7272
workflow_runs_on: 'ubuntu-24.04'
73-
dotnet_sdk_version: '8.0.100'
73+
dotnet_sdk_version: '10.0.100'
7474
dry_run: ${{ needs.determine-release-target.outputs.dry_run == 'true' }}
7575
secrets:
7676
token_repo: ${{ secrets.PUBLISH_NEW_RELEASE }}

.github/workflows/publish-release-target.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ on:
1515

1616
jobs:
1717
run-publish-release-target:
18-
uses: smdn/Smdn.Fundamentals/.github/workflows/publish-release-target.yml@workflows/release-target/v1.11.0
18+
uses: smdn/Smdn.Fundamentals/.github/workflows/publish-release-target.yml@workflows/release-target/v1.12.1
1919
if: |
2020
(github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')) &&
2121
(contains(github.event.pull_request.labels.*.name, 'release-target'))
2222
with:
2323
pr_number_request_for_release: ${{ github.event.pull_request.number }}
2424
pr_label_request_for_release: 'release-target'
2525
workflow_runs_on: 'ubuntu-24.04'
26-
dotnet_sdk_version: '8.0.100'
26+
dotnet_sdk_version: '10.0.100'
2727
secrets:
2828
token_repo: ${{ secrets.PUBLISH_NEW_RELEASE }}
2929
token_push_nuget_org: ${{ secrets.PUBLISH_PACKAGE_NUGETORG }}

.github/workflows/test-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ jobs:
5656

5757
run-test:
5858
name: Run tests with released packages
59-
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test/v1.5.0
59+
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test/v1.6.0
6060
needs: await-package-publishing
6161
if: ${{ always() && !failure() && !cancelled() }} # run tests even if await-package-publishing is skipped
6262
with:
6363
project: ${{ inputs.project }}
6464
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
6565
extra_options_common: '/p:TestReleasedPackage=true'
6666
verbose: ${{ inputs.verbose == 'true' }}
67-
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '8.0.100' || inputs.dotnet_sdk_version }}
67+
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '10.0.100' || inputs.dotnet_sdk_version }}
6868
timeout_minutes_test_job: 10
6969
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
7070
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ on:
6767
jobs:
6868
run-test:
6969
name: Run tests
70-
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test/v1.5.0
70+
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test/v1.6.0
7171
with:
7272
project: ${{ inputs.project }}
7373
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
7474
verbose: ${{ inputs.verbose == 'true' }}
75-
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '8.0.100' || inputs.dotnet_sdk_version }}
75+
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '10.0.100' || inputs.dotnet_sdk_version }}
7676
timeout_minutes_test_job: 10
7777
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
7878
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"

.vscode/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"munin",
1919
"smdn",
2020
"SYSLIB",
21+
"trimmable",
2122
],
2223
"ignoreWords": [
2324
"dirtyconfig",

eng/BuildAllProjects.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Set-Location $RepositoryRootDirectory
1111

1212
$SolutionFile = [System.IO.Path]::GetFileName(
1313
[System.IO.Path]::GetDirectoryName($RepositoryRootDirectory)
14-
) + ".temp.sln"
14+
) + ".temp.slnx"
1515

16-
dotnet new sln --force --name $([System.IO.Path]::GetFileNameWithoutExtension($SolutionFile))
16+
dotnet new sln --force --format slnx --name $([System.IO.Path]::GetFileNameWithoutExtension($SolutionFile))
1717

1818
# add build target projects to the solution
19-
$ProjectFiles = Get-ChildItem -Path $([System.IO.Path]::Join($RepositoryRootDirectory, 'src', 'Smdn.*', '*')) -Filter '*.csproj'
19+
$ProjectFiles = Get-ChildItem -Path $([System.IO.Path]::Join($RepositoryRootDirectory, 'src', 'Smdn.*', 'Smdn.*.csproj')) -File
2020

2121
foreach ($ProjectFile in $ProjectFiles) {
2222
dotnet sln $SolutionFile add $ProjectFile

global.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"msbuild-sdks": {
3-
"Smdn.MSBuild.ProjectAssets.Common": "1.6.1",
4-
"Smdn.MSBuild.ProjectAssets.Library": "1.9.1"
3+
"Smdn.MSBuild.ProjectAssets.Common": "1.6.2",
4+
"Smdn.MSBuild.ProjectAssets.Library": "1.12.2"
5+
},
6+
"test": {
7+
"runner": "Microsoft.Testing.Platform"
58
}
69
}

src/Directory.Build.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp>
33
SPDX-License-Identifier: MIT
44
-->
55
<Project>
6-
<Import Project="Sdk.props" Sdk="Smdn.MSBuild.ProjectAssets.Common" />
76
<Import Project="Sdk.props" Sdk="Smdn.MSBuild.ProjectAssets.Library" />
87

98
<PropertyGroup Label="Configurations for Smdn.MSBuild.ProjectAssets.*">
@@ -25,7 +24,7 @@ SPDX-License-Identifier: MIT
2524
<ItemGroup>
2625
<PackageReference
2726
Include="Smdn.MSBuild.DefineConstants.NETSdkApi"
28-
Version="[1.5.2]"
27+
Version="[1.6.0]"
2928
PrivateAssets="all"
3029
IncludeAssets="build"
3130
/>

0 commit comments

Comments
 (0)