diff --git a/.appveyor.yml b/.appveyor.yml index f7f80b0..a8b1255 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,8 +11,9 @@ install: - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null - ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.405 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.102 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.417 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.404 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.100 -InstallDir $env:DOTNET_INSTALL_DIR' - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" - ps: dotnet --info diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 2bb8789..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 2 -updates: -- package-ecosystem: nuget - directory: "/src" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 - ignore: - - dependency-name: Cake.Core - update-types: ["version-update:semver-minor"] - - dependency-name: Cake.Testing - update-types: ["version-update:semver-minor"] - - dependency-name: Cake.Issues - update-types: ["version-update:semver-minor"] - - dependency-name: Cake.Issues.PullRequests - update-types: ["version-update:semver-minor"] - - dependency-name: Cake.Issues.Testing - update-types: ["version-update:semver-minor"] \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..8588d1c --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>cake-contrib/renovate-presets:cake-issues" + ] +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17b475b..9e5d0c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,22 +7,23 @@ jobs: runs-on: windows-latest steps: - name: Get the sources - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Fetch all tags and branches run: git fetch --prune --unshallow - name: Install .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4 with: # .NET 5 required for GitVersion dotnet-version: | 5.x 6.x 7.x + 8.x - name: Build run: .\build.ps1 shell: powershell - name: Publish NuGet package as build artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 with: name: NuGet Package path: ./BuildArtifacts/Packages/NuGet/ @@ -33,14 +34,14 @@ jobs: runs-on: windows-latest steps: - name: Get the sources - uses: actions/checkout@v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Download build artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4 with: name: NuGet Package path: ./BuildArtifacts/Packages/NuGet - name: Install .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4 with: dotnet-version: | 6.x diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..10a5e20 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "src\\Cake.Issues.PullRequests.GitHubActions.sln" +} \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 725f28f..ea5955a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,5 +27,9 @@ jobs: inputs: version: '7.x' displayName: 'Install .NET 7' + - task: UseDotNet@2 + inputs: + version: '8.x' + displayName: 'Install .NET 8' - powershell: ./build.ps1 displayName: 'Cake Build' \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..3660ff8 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.100", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec b/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec index 28df43e..446d3eb 100644 --- a/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec +++ b/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec @@ -22,7 +22,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin Copyright © Pascal Berger cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest buildserver github github-actions - https://github.com/cake-contrib/Cake.Issues.PullRequests.GitHubActions/releases/tag/3.0.0 + https://github.com/cake-contrib/Cake.Issues.PullRequests.GitHubActions/releases/tag/4.0.0 @@ -32,5 +32,8 @@ See the Project Site for an overview of the whole ecosystem of addins for workin + + + \ No newline at end of file diff --git a/recipe.cake b/recipe.cake index aed7b12..26a4cc3 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,4 @@ -#load nuget:https://pkgs.dev.azure.com/cake-contrib/Home/_packaging/addins/nuget/v3/index.json?package=Cake.Recipe&version=3.0.0-beta0001-0007&prerelease +#load nuget:?package=Cake.Recipe&version=3.1.1 //************************************************************************************************* // Settings diff --git a/src/Cake.Issues.PullRequests.GitHubActions.Tests/Cake.Issues.PullRequests.GitHubActions.Tests.csproj b/src/Cake.Issues.PullRequests.GitHubActions.Tests/Cake.Issues.PullRequests.GitHubActions.Tests.csproj index d97909f..f1ee17f 100644 --- a/src/Cake.Issues.PullRequests.GitHubActions.Tests/Cake.Issues.PullRequests.GitHubActions.Tests.csproj +++ b/src/Cake.Issues.PullRequests.GitHubActions.Tests/Cake.Issues.PullRequests.GitHubActions.Tests.csproj @@ -14,13 +14,13 @@ - - - + + + - - + + diff --git a/src/Cake.Issues.PullRequests.GitHubActions/Cake.Issues.PullRequests.GitHubActions.csproj b/src/Cake.Issues.PullRequests.GitHubActions/Cake.Issues.PullRequests.GitHubActions.csproj index 79a55bb..3ca899d 100644 --- a/src/Cake.Issues.PullRequests.GitHubActions/Cake.Issues.PullRequests.GitHubActions.csproj +++ b/src/Cake.Issues.PullRequests.GitHubActions/Cake.Issues.PullRequests.GitHubActions.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0;net7.0;net8.0 Addin for writing code analyzer or linter issues to GitHub Actions Pascal Berger Copyright © Pascal Berger and contributors @@ -16,10 +16,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Cake.Issues.PullRequests.GitHubActions/GitHubActionsPullRequestSystem.cs b/src/Cake.Issues.PullRequests.GitHubActions/GitHubActionsPullRequestSystem.cs index dd0cbaf..25be50a 100644 --- a/src/Cake.Issues.PullRequests.GitHubActions/GitHubActionsPullRequestSystem.cs +++ b/src/Cake.Issues.PullRequests.GitHubActions/GitHubActionsPullRequestSystem.cs @@ -12,6 +12,7 @@ /// public class GitHubActionsPullRequestSystem : BasePullRequestSystem { + private static readonly char[] Separator = ['\n']; private readonly GitHubActionsBuildSettings settings; /// @@ -111,7 +112,7 @@ private void WriteIssues(IEnumerable issues) // Commands don't support line breaks, therefore we only use the first line of the message. var message = issue.MessageText - .Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries) + .Split(Separator, StringSplitOptions.RemoveEmptyEntries) .FirstOrDefault() ?.Trim(); diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..a95ac95 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,5 @@ + + + latest + + \ No newline at end of file diff --git a/tests/integration/.config/dotnet-tools.json b/tests/integration/.config/dotnet-tools.json index 831d039..da200cd 100644 --- a/tests/integration/.config/dotnet-tools.json +++ b/tests/integration/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "3.0.0", + "version": "4.0.0", "commands": [ "dotnet-cake" ]