Skip to content

Commit d1c87ed

Browse files
authored
Merge pull request #153 from twenzel/feature/UpdateToCake5
Update to Cake 5.0
2 parents dd2638a + e86fb41 commit d1c87ed

12 files changed

Lines changed: 180 additions & 75 deletions

File tree

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"cake.tool": {
6-
"version": "1.3.0",
6+
"version": "2.3.0",
77
"commands": [
88
"dotnet-cake"
99
]

.github/CODEOFCONDUCT.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
- The use of sexualized language or imagery
10+
- Personal attacks
11+
- Trolling or insulting/derogatory comments
12+
- Public or private harassment
13+
- Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
- Other unethical or unprofessional conduct
15+
16+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
17+
18+
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
19+
20+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
21+
22+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at [[email protected]](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
23+
24+
This Code of Conduct is adapted from the Contributor Covenant, version 1.3.0, available from http://contributor-covenant.org/version/1/3/0/

.github/dependabot.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/renovate.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>cake-contrib/renovate-presets:cake-recipe",
5+
"github>cake-contrib/renovate-presets:github-actions" ],
6+
"packageRules": [
7+
{
8+
"description": "Updates to Cake.Core references are breaking.",
9+
"matchPackageNames": ["Cake.Core"],
10+
"matchUpdateTypes": ["major"],
11+
"labels": ["Breaking Change"]
12+
}
13+
]
14+
}

.github/workflows/build.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
os: [windows-2022, ubuntu-20.04, macos-12]
22+
os: [ windows-2025, ubuntu-24.04 ]
2323

2424
env:
2525
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
@@ -40,47 +40,60 @@ jobs:
4040
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
4141
WYAM_DEPLOY_BRANCH: "gh-pages"
4242
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
43+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
4344
steps:
4445
- name: Checkout the repository
45-
uses: actions/checkout@v3
46+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
47+
with:
48+
fetch-depth: 0
4649

47-
- name: Fetch all tags and branches
48-
run: git fetch --prune --unshallow
49-
50-
- name: Install .NET SDK
51-
uses: actions/[email protected]
52-
with:
53-
# gitversion needs 5.0 and we need all SDKs the project is targeting
50+
- name: Install dotnet
51+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5
52+
with:
5453
dotnet-version: |
55-
5.0.403
56-
6.0.100
57-
7.0.100
58-
8.0.100
54+
6.0.x
55+
7.0.x
56+
8.0.x
57+
9.0.x
58+
10.0.x
59+
60+
- name: Install mono
61+
if: runner.os == 'Linux'
62+
# check https://www.mono-project.com/download/stable/#download-lin
63+
run: |
64+
sudo apt install ca-certificates gnupg
65+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
66+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
67+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
68+
sudo apt update
69+
sudo apt install -y mono-complete
70+
mono --version
5971
6072
- name: Cache Tools
61-
uses: actions/cache@v3
73+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
6274
with:
6375
path: tools
6476
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
6577

6678
- name: Build project
67-
uses: cake-build/cake-action@v1.4.1
79+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
6880
with:
6981
script-path: recipe.cake
7082
target: CI
7183
verbosity: Normal
7284
cake-version: tool-manifest
7385

7486
- name: Upload Issues-Report
75-
uses: actions/upload-artifact@v3
87+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
7688
with:
7789
if-no-files-found: warn
78-
name: issues
90+
name: ${{ matrix.os }} issues
7991
path: BuildArtifacts/report.html
8092

8193
- name: Upload Packages
82-
uses: actions/upload-artifact@v3
94+
if: runner.os == 'Windows'
95+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
8396
with:
8497
if-no-files-found: warn
8598
name: package
86-
path: BuildArtifacts/Packages/**/*
99+
path: BuildArtifacts/Packages/**/*

.github/workflows/codeql-analysis.yml

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ on:
1313
branches: [develop]
1414
schedule:
1515
- cron: '0 15 * * 6'
16+
workflow_dispatch:
1617

1718
jobs:
1819
analyze:
1920
name: Analyze
20-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-24.04
2122

2223
strategy:
2324
fail-fast: false
@@ -30,27 +31,70 @@ jobs:
3031

3132
steps:
3233
- name: Checkout repository
33-
uses: actions/checkout@v3
34+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
3435
with:
3536
fetch-depth: 0
3637

37-
# If this run was triggered by a pull request event, then checkout
38-
# the head of the pull request instead of the merge commit.
39-
- run: git checkout HEAD^2
40-
if: ${{ github.event_name == 'pull_request' }}
38+
- name: Install dotnet
39+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5
40+
with:
41+
# codecov needs 2.1
42+
# unittests needs 3.1
43+
# gitversion needs 5.0
44+
dotnet-version: |
45+
2.1.x
46+
3.1.x
47+
5.0.x
48+
6.0.x
49+
7.0.x
50+
8.0.x
51+
52+
- name: Cache Tools
53+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
54+
with:
55+
path: tools
56+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
57+
58+
- name: Install mono
59+
if: runner.os == 'Linux'
60+
# check https://www.mono-project.com/download/stable/#download-lin
61+
run: |
62+
sudo apt install ca-certificates gnupg
63+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
64+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
65+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
66+
sudo apt update
67+
sudo apt install -y mono-complete
68+
mono --version
4169
4270
# Initializes the CodeQL tools for scanning.
4371
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v2
72+
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4
4573
with:
4674
languages: ${{ matrix.language }}
4775
# If you wish to specify custom queries, you can do so here or in a config file.
4876
# By default, queries listed here will override any specified in a config file.
4977
# Prefix the list here with "+" to use these queries and those in the config file.
5078
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5179

52-
- run: ./build.ps1
53-
shell: pwsh
80+
- name: Build project
81+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
82+
with:
83+
script-path: recipe.cake
84+
target: DotNet-Build
85+
cake-version: tool-manifest
86+
env:
87+
COMPlus_DbgEnableMiniDump: 1
88+
COMPlus_DbgMiniDumpType: 1
89+
COMPlus_DbgMiniDumpName: BuildArtifacts/coredump.dmp
5490

5591
- name: Perform CodeQL Analysis
56-
uses: github/codeql-action/analyze@v2
92+
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4
93+
94+
- name: Upload CoreDump
95+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
96+
if: failure()
97+
with:
98+
if-no-files-found: warn
99+
name: CoreDump
100+
path: BuildArtifacts/coredump.dmp

.github/workflows/publishDocs.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,35 @@ env:
1111

1212
jobs:
1313
cake:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515

1616
steps:
1717
- name: checkout
18-
uses: actions/checkout@v3 #https://github.com/actions/checkout
18+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 #https://github.com/actions/checkout
1919
with:
2020
fetch-depth: 0 # GitVersion is somewhat irritated when fetch-depth is "1"....
2121
ref: ${{ github.event.ref }}
2222

23+
- name: Install mono
24+
if: runner.os == 'Linux'
25+
# check https://www.mono-project.com/download/stable/#download-lin
26+
run: |
27+
sudo apt install ca-certificates gnupg
28+
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
29+
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
30+
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
31+
sudo apt update
32+
sudo apt install -y mono-complete
33+
mono --version
34+
2335
- name: Cache Tools
24-
uses: actions/cache@v3
36+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
2537
with:
2638
path: tools
2739
key: ${{ runner.os }}-doc-tools-${{ hashFiles('recipe.cake') }}
2840

2941
- name: Publishing documentation
30-
uses: cake-build/cake-action@v1.4.1
42+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
3143
with:
3244
script-path: recipe.cake
3345
target: Force-Publish-Documentation

.github/workflows/release-notes.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,38 @@ jobs:
77
draft-stable:
88
env:
99
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout the requested branch
14-
uses: actions/checkout@v3
15-
- name: Fetch all tags and branches
16-
run: git fetch --prune --unshallow
14+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
15+
with:
16+
fetch-depth: 0
1717
- name: Cache Tools
18-
uses: actions/cache@v3
18+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
1919
with:
2020
path: tools
2121
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
2222
- name: Set up git version
2323
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
24-
uses: gittools/actions/gitversion/setup@v0.10.2
24+
uses: gittools/actions/gitversion/setup@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.0
2525
with:
2626
versionSpec: "5.x"
2727
- name: Run git version
2828
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
2929
id: gitversion
30-
uses: gittools/actions/gitversion/execute@v0.10.2
30+
uses: gittools/actions/gitversion/execute@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.0
3131
- name: Create release branch ${{ github.event.inputs.version }}
3232
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
3333
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
3434
- name: Push new branch
3535
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
36-
uses: ad-m/github-push-action@v0.6.0
36+
uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa # v1.0.0
3737
with:
3838
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
3939
github_token: ${{ secrets.GH_TOKEN }}
4040
- name: Drafting Release Notes
41-
uses: cake-build/cake-action@v1.4.1
41+
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
4242
with:
4343
script-path: recipe.cake
4444
target: releasenotes

recipe.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:?package=Cake.Recipe&version=3.0.1
1+
#load nuget:?package=Cake.Recipe&version=4.0.0
22
Environment.SetVariableNames();
33

44
BuildParameters.SetParameters(context: Context,

src/Cake.FileHelpers.Tests/Cake.FileHelpers.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageReference Include="Cake.Testing" Version="4.0.0" />
7-
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
6+
<PackageReference Include="Cake.Testing" Version="5.0.0" />
7+
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
88
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
99
<PrivateAssets>all</PrivateAssets>
1010
</PackageReference>
11-
<PackageReference Include="xunit" Version="2.6.2" />
12-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
11+
<PackageReference Include="xunit" Version="2.9.3" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
1313
<PrivateAssets>all</PrivateAssets>
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1515
</PackageReference>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1717
</ItemGroup>
1818
<ItemGroup>
1919
<ProjectReference Include="..\Cake.FileHelpers\Cake.FileHelpers.csproj" />

0 commit comments

Comments
 (0)