Skip to content

Commit 5d1b4b9

Browse files
authored
Merge pull request #79 from AArnott/dev/andarno/libtemplateUpdate
Merge latest Library.Template
2 parents b4ef9b1 + e332f1e commit 5d1b4b9

19 files changed

+228
-54
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.5.0",
6+
"version": "7.5.1",
77
"commands": [
88
"pwsh"
99
],
1010
"rollForward": false
1111
},
1212
"dotnet-coverage": {
13-
"version": "17.13.1",
13+
"version": "17.14.2",
1414
"commands": [
1515
"dotnet-coverage"
1616
],
@@ -24,7 +24,7 @@
2424
"rollForward": false
2525
},
2626
"docfx": {
27-
"version": "2.78.2",
27+
"version": "2.78.3",
2828
"commands": [
2929
"docfx"
3030
],

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.301-noble@sha256:4f50505b5344e9d8a76805d71bb4ba76da6b01656e17a66a8ce1e4c4dfaaec12
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.

.github/actions/publish-artifacts/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,46 @@ runs:
1414

1515
- name: 📢 Upload project.assets.json files
1616
if: always()
17-
uses: actions/upload-artifact@v4
17+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
1818
with:
1919
name: projectAssetsJson-${{ runner.os }}
2020
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
2121
continue-on-error: true
2222
- name: 📢 Upload variables
23-
uses: actions/upload-artifact@v4
23+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2424
with:
2525
name: variables-${{ runner.os }}
2626
path: ${{ runner.temp }}/_artifacts/Variables
2727
continue-on-error: true
2828
- name: 📢 Upload build_logs
2929
if: always()
30-
uses: actions/upload-artifact@v4
30+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3131
with:
3232
name: build_logs-${{ runner.os }}
3333
path: ${{ runner.temp }}/_artifacts/build_logs
3434
continue-on-error: true
3535
- name: 📢 Upload testResults
3636
if: always()
37-
uses: actions/upload-artifact@v4
37+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3838
with:
3939
name: testResults-${{ runner.os }}
4040
path: ${{ runner.temp }}/_artifacts/testResults
4141
continue-on-error: true
4242
- name: 📢 Upload coverageResults
4343
if: always()
44-
uses: actions/upload-artifact@v4
44+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
4545
with:
4646
name: coverageResults-${{ runner.os }}
4747
path: ${{ runner.temp }}/_artifacts/coverageResults
4848
continue-on-error: true
4949
- name: 📢 Upload symbols
50-
uses: actions/upload-artifact@v4
50+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5151
with:
5252
name: symbols-${{ runner.os }}
5353
path: ${{ runner.temp }}/_artifacts/symbols
5454
continue-on-error: true
5555
- name: 📢 Upload deployables
56-
uses: actions/upload-artifact@v4
56+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5757
with:
5858
name: deployables-${{ runner.os }}
5959
path: ${{ runner.temp }}/_artifacts/deployables

.github/renovate.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:recommended"],
4-
"semanticCommits": "disabled",
3+
"extends": ["config:best-practices"],
54
"labels": ["dependencies"],
65
"packageRules": [
76
{
@@ -21,6 +20,10 @@
2120
"matchDatasources": ["dotnet-version", "docker"],
2221
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
2322
"groupName": "Dockerfile and global.json updates"
23+
},
24+
{
25+
"matchPackageNames": ["*"],
26+
"allowedVersions": "!/-g[a-f0-9]+$/"
2427
}
2528
]
2629
}

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- windows-2022
3232

3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3535
with:
3636
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
3737
- name: ⚙ Install prerequisites
@@ -72,6 +72,16 @@ jobs:
7272
continue-on-error: true
7373
if: env.codecov_token != ''
7474

75+
docs:
76+
name: 📃 Docs
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
80+
- name: 🔗 Markup Link Checker (mlc)
81+
uses: becheran/mlc@88c9db09b8dabab813a2edd13f955b36aa73657a # v0.22.0
82+
with:
83+
args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx
84+
7585
ship:
7686
if: startsWith(github.ref, 'refs/tags/v')
7787
needs: build
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/copilot-setup-steps.yml
12+
pull_request:
13+
paths:
14+
- .github/workflows/copilot-setup-steps.yml
15+
16+
jobs:
17+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
18+
copilot-setup-steps:
19+
runs-on: ubuntu-latest
20+
# Set the permissions to the lowest permissions possible needed for your steps.
21+
# Copilot will be given its own token for its operations.
22+
permissions:
23+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
24+
contents: read
25+
26+
# You can define any steps you want, and they will run before the agent starts.
27+
# If you do not check out your code, Copilot will do this for you.
28+
steps:
29+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
30+
with:
31+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
32+
- name: ⚙ Install prerequisites
33+
run: |
34+
./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider
35+
dotnet --info
36+
37+
# Print mono version if it is present.
38+
if (Get-Command mono -ErrorAction SilentlyContinue) {
39+
mono --version
40+
}
41+
shell: pwsh

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
url: ${{ steps.deployment.outputs.page_url }}
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2929
with:
3030
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
3131
- name: ⚙ Install prerequisites
@@ -35,10 +35,10 @@ jobs:
3535
name: 📚 Generate documentation
3636

3737
- name: Upload artifact
38-
uses: actions/upload-pages-artifact@v3
38+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
3939
with:
4040
path: docfx/_site
4141

4242
- name: Deploy to GitHub Pages
4343
id: deployment
44-
uses: actions/deploy-pages@v4
44+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/libtemplate-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
contents: write
1818
pull-requests: write
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2121
with:
2222
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
2323

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
Echo "runid=$runid" >> $env:GITHUB_OUTPUT
6666
6767
- name: 🔻 Download deployables artifacts
68-
uses: actions/download-artifact@v4
68+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
6969
with:
7070
name: deployables-Linux
7171
path: ${{ runner.temp }}/deployables
@@ -74,11 +74,11 @@ jobs:
7474

7575
- name: 💽 Upload artifacts to release
7676
shell: pwsh
77-
if: ${{ github.event.release.assets_url }} != ''
77+
if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }}
7878
env:
7979
GH_TOKEN: ${{ github.token }}
8080
run: |
81-
Get-ChildItem '${{ runner.temp }}/deployables' |% {
81+
Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% {
8282
Write-Host "Uploading $($_.Name) to release..."
8383
gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
8484
}

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You should install the version specified in `global.json` or a later version wit
2525
the same major.minor.Bxx "hundreds" band.
2626
For example if 2.2.300 is specified, you may install 2.2.300, 2.2.301, or 2.2.310
2727
while the 2.2.400 version would not be considered compatible by .NET SDK.
28-
See [.NET Core Versioning](https://docs.microsoft.com/dotnet/core/versions/) for more information.
28+
See [.NET Core Versioning](https://learn.microsoft.com/dotnet/core/versions/) for more information.
2929

3030
## Package restore
3131

@@ -44,7 +44,7 @@ Building, testing, and packing this repository can be done by using the standard
4444
## Releases
4545

4646
Use `nbgv tag` to create a tag for a particular commit that you mean to release.
47-
[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md).
47+
[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://dotnet.github.io/Nerdbank.GitVersioning/docs/nbgv-cli.html).
4848

4949
Push the tag.
5050

@@ -82,3 +82,17 @@ Configuration is in the `.github/renovate.json` file.
8282
When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/).
8383

8484
If Renovate is not creating pull requests when you expect it to, check that the [Renovate GitHub App](https://github.com/apps/renovate) is configured for your account or repo.
85+
86+
## Merging latest from Library.Template
87+
88+
### Maintaining your repo based on this template
89+
90+
The best way to keep your repo in sync with Library.Template's evolving features and best practices is to periodically merge the template into your repo:
91+
`
92+
```ps1
93+
git fetch
94+
git checkout origin/main
95+
.\tools\MergeFrom-Template.ps1
96+
# resolve any conflicts, then commit the merge commit.
97+
git push origin -u HEAD
98+
```

0 commit comments

Comments
 (0)