Skip to content

Commit 9366e75

Browse files
committed
apply updates from repository template
1 parent cfd5aa6 commit 9366e75

8 files changed

Lines changed: 61 additions & 28 deletions

File tree

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# The default owners for everything in the repo.
2+
* @smdn

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ updates:
1818
GitHub-Actions-Workflows:
1919
patterns:
2020
- "actions/*"
21-
GitHub-CodeQL-Action:
21+
GitHub-CodeQL-Actions:
2222
patterns:
23-
- "github/codeql-action"
23+
- "github/codeql-action/*"
2424
smdn-workflows-dotnet:
2525
patterns:
26-
- "smdn/workflows-dotnet"
26+
- "smdn/workflows-dotnet/*"
2727
ignore:
2828
# smdn/workflows-dotnet: report major and minor updates only
2929
- dependency-name: "smdn/workflows-dotnet"
@@ -35,7 +35,7 @@ updates:
3535
- "version-update:semver-minor"
3636
- "version-update:semver-patch"
3737
# github/codeql-action: report major and minor updates only
38-
- dependency-name: "github/codeql-action"
38+
- dependency-name: "github/codeql-action/*"
3939
update-types:
4040
- "version-update:semver-patch"
4141
- package-ecosystem: "nuget"

.github/workflows/codeql-analysis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#
1212
name: "CodeQL"
1313

14+
permissions: {}
15+
1416
# ref: https://docs.microsoft.com/en-us/dotnet/devops/dotnet-secure-github-action
1517
on:
1618
# push:
@@ -36,7 +38,7 @@ env:
3638
# cSpell:ignore autobuild
3739
jobs:
3840
analyze:
39-
name: Analyze
41+
name: Analyze ${{ matrix.language }}
4042
runs-on: ubuntu-latest
4143
permissions:
4244
actions: read
@@ -52,15 +54,19 @@ jobs:
5254
- language: csharp
5355
build-mode: manual
5456
source-root: './src'
57+
- language: actions
58+
build-mode: none
59+
source-root: './.github'
5560

5661
steps:
5762
- name: Checkout repository
5863
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5964

6065
- name: Initialize CodeQL
61-
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
66+
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
6267
with:
6368
languages: ${{ matrix.language }}
69+
build-mode: ${{ matrix.build-mode }}
6470
# If you wish to specify custom queries, you can do so here or in a config file.
6571
# By default, queries listed here will override any specified in a config file.
6672
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -69,7 +75,7 @@ jobs:
6975

7076
- name: Autobuild
7177
if: ${{ (matrix.build-mode == 'autobuild') || (matrix.build-mode == '') }}
72-
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
78+
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
7379

7480
- name: Prepare .NET SDK ${{ env.MINIMAL_DOTNET_SDK_VERSION }}
7581
uses: smdn/workflows-dotnet/actions/prepare-dotnet-sdk@e294de483afffc1d3a366fbba853efe23c7b7d4c # actions/prepare-dotnet-sdk/v1.2.0
@@ -83,4 +89,6 @@ jobs:
8389
./eng/BuildAllProjects.ps1
8490
8591
- name: Perform CodeQL Analysis
86-
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
92+
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
93+
with:
94+
category: "/language:${{ matrix.language }}"

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
name: Generate release target
55
run-name: Generate release target for ${{ inputs.release_target_tag_name || github.ref_name }}
66

7-
permissions:
8-
contents: write
9-
pull-requests: write
7+
permissions: {}
108

119
on:
1210
push:
@@ -61,7 +59,10 @@ jobs:
6159
exit 1
6260
6361
run-generate-release-target:
64-
uses: smdn/workflows-dotnet/.github/workflows/generate-release-target.yml@17112594cdc2a6dd9bf2417fe103174ded21863f # release-target/v1.16.1
62+
uses: smdn/workflows-dotnet/.github/workflows/generate-release-target.yml@6b1c9e567396e1e2e1e70d11a5a54cbe87d0eec6 # release-target/v1.16.4
63+
permissions:
64+
contents: write
65+
pull-requests: write
6566
needs: determine-release-target
6667
if: startsWith(needs.determine-release-target.outputs.tag_name, 'new-release/')
6768
with:

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
name: Publish release target
55
run-name: Publish release target ${{ github.head_ref }}
66

7-
permissions:
8-
contents: write
9-
packages: write
10-
pull-requests: read
7+
permissions: {}
118

129
on:
1310
pull_request:
1411
types: [closed]
1512

1613
jobs:
1714
run-publish-release-target:
18-
uses: smdn/workflows-dotnet/.github/workflows/publish-release-target.yml@17112594cdc2a6dd9bf2417fe103174ded21863f # release-target/v1.16.1
15+
uses: smdn/workflows-dotnet/.github/workflows/publish-release-target.yml@6b1c9e567396e1e2e1e70d11a5a54cbe87d0eec6 # release-target/v1.16.4
16+
permissions:
17+
contents: write
18+
packages: write
19+
pull-requests: read
1920
if: |
2021
(github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')) &&
2122
(contains(github.event.pull_request.labels.*.name, 'release-target'))

.github/workflows/test-packages.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
name: Run tests with released packages
55

6+
permissions: {}
7+
68
on:
79
release:
810
types: [published]
@@ -60,14 +62,16 @@ jobs:
6062
with:
6163
release_tag: ${{ github.event.release.tag_name }}
6264

63-
run-test:
65+
run-tests-package-dotnet:
6466
name: Run tests with released packages
65-
uses: smdn/workflows-dotnet/.github/workflows/test.yml@7144c60e15cd292c33d720ea0ef963abfda49dab # test/v1.10.1
67+
uses: smdn/workflows-dotnet/.github/workflows/test.yml@9ec9f2dc7d5b039bbc9e22aae98cb00c84d806df # test/v1.10.4
68+
permissions:
69+
contents: read
6670
needs: await-package-publishing
6771
if: ${{ always() && !failure() && !cancelled() }} # run tests even if await-package-publishing is skipped
6872
with:
6973
project: ${{ inputs.project }}
70-
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
74+
os: ${{ inputs.os == '' && 'ubuntu-26.04, ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
7175
extra_options_common: '/p:TestReleasedPackage=true'
7276
verbose: ${{ inputs.verbose == true }}
7377
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '10.0.100' || inputs.dotnet_sdk_version }}

.github/workflows/test.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
name: Run tests
55

6+
permissions: {}
7+
68
on:
79
push:
810
branches: [ main ]
@@ -71,12 +73,14 @@ on:
7173
default: ''
7274

7375
jobs:
74-
run-test:
75-
name: Run tests
76-
uses: smdn/workflows-dotnet/.github/workflows/test.yml@7144c60e15cd292c33d720ea0ef963abfda49dab # test/v1.10.1
76+
run-tests-dotnet:
77+
name: Run .NET tests
78+
uses: smdn/workflows-dotnet/.github/workflows/test.yml@9ec9f2dc7d5b039bbc9e22aae98cb00c84d806df # test/v1.10.4
79+
permissions:
80+
contents: read
7781
with:
7882
project: ${{ inputs.project }}
79-
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
83+
os: ${{ inputs.os == '' && 'ubuntu-26.04, ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest' || inputs.os }}
8084
verbose: ${{ inputs.verbose == true }}
8185
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '10.0.100' || inputs.dotnet_sdk_version }}
8286
timeout_minutes_test_job: 10
@@ -88,3 +92,14 @@ jobs:
8892
dotnet_test_options_output_verbosity_level: ${{ inputs.dotnet_test_options_output_verbosity_level }}
8993
secrets:
9094
token_repo: ${{ secrets.GITHUB_TOKEN }}
95+
96+
post-tests-dotnet:
97+
# This job is intended to be referenced by the branch protection rules (Status Checks).
98+
# Do not change the 'name' or job ID, as doing so will break the status check validation.
99+
# Avoid adding 'if: always()', otherwise this job will report success even if previous tests fail.
100+
name: .NET test status
101+
needs: run-tests-dotnet
102+
runs-on: ubuntu-slim
103+
steps:
104+
- name: .NET test status
105+
run: echo "All .NET tests completed successfully."

tests/TargetFrameworks.props

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp>
33
SPDX-License-Identifier: MIT
44
-->
@@ -28,14 +28,16 @@ SPDX-License-Identifier: MIT
2828
<EnableTargetFrameworkNetFx Condition=" '$(GITHUB_ACTIONS)' != 'true' ">false</EnableTargetFrameworkNetFx>
2929
</PropertyGroup>
3030

31-
<!-- On Ubuntu 24.04 -->
31+
<!-- On Ubuntu 24.04/26.04 -->
3232
<PropertyGroup
3333
Condition="
3434
$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier.StartsWith('ubuntu.24.04')) or
35-
$([System.Runtime.InteropServices.RuntimeInformation]::OSDescription.StartsWith('Ubuntu 24.04'))
35+
$([System.Runtime.InteropServices.RuntimeInformation]::OSDescription.StartsWith('Ubuntu 24.04')) or
36+
$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier.StartsWith('ubuntu.26.04')) or
37+
$([System.Runtime.InteropServices.RuntimeInformation]::OSDescription.StartsWith('Ubuntu 26.04'))
3638
"
3739
>
38-
<!-- disable Mono on GitHub Actions Ubuntu 24.04 runner images -->
40+
<!-- disable Mono on GitHub Actions Ubuntu 24.04/26.04 runner images -->
3941
<EnableTargetFrameworkNetFx Condition=" '$(GITHUB_ACTIONS)' == 'true' ">false</EnableTargetFrameworkNetFx>
4042
</PropertyGroup>
4143

0 commit comments

Comments
 (0)