diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..405f693 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +name: CI + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + types: [opened, synchronize, reopened] + workflow_dispatch: + +jobs: + build_test: + name: Build and Test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + + env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Setup .NET SDKs (9.0 + 8.0) + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 9.0.x + 8.0.x + + - name: Show .NET info + run: dotnet --info + shell: pwsh + + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.fsproj', '**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Cache Cake addins + uses: actions/cache@v4 + with: + path: tools/Addins + key: ${{ runner.os }}-cake-addins-${{ hashFiles('build.cake') }} + restore-keys: | + ${{ runner.os }}-cake-addins- + + - name: Make build.sh executable (non-Windows) + if: runner.os != 'Windows' + run: chmod +x ./build.sh + shell: bash + + # Mirror Travis behavior on non-Windows + - name: Build via build.sh (Travis target) + if: runner.os != 'Windows' + run: ./build.sh --target Travis --verbosity diagnostic + shell: bash + + # Mirror AppVeyor behavior on Windows + - name: Build via build.ps1 (AppVeyor target) + if: runner.os == 'Windows' + run: ./build.ps1 -Target AppVeyor -Verbosity Diagnostic + shell: pwsh \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 12fb01d..aeaf38d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,8 @@ matrix: key_url: "https://packages.microsoft.com/keys/microsoft.asc" packages: - powershell - - dotnet-sdk-6.0 - - dotnet-sdk-7.0 - - dotnet-sdk-8.0 + - dotnet-sdk-8.0 + - dotnet-sdk-9.0 - os: osx osx_image: xcode12.2 @@ -22,16 +21,15 @@ matrix: - brew tap homebrew/cask - brew install --cask powershell - brew tap isen-ng/dotnet-sdk-versions - - brew install --cask dotnet-sdk6-0-423 - - brew install --cask dotnet-sdk7-0-410 - - brew install --cask dotnet-sdk8-0-302 + - brew install --cask dotnet-sdk8-0-415 + - brew install --cask dotnet-sdk9-0-306 fast_finish: true mono: - latest -dotnet: 8.0.302 +dotnet: 9.0.306 before_install: - git fetch --unshallow # Travis always does a shallow clone, but GitVersion needs the full history including branches and tags diff --git a/README.md b/README.md index de00d65..26c39a5 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Install-Package Cake.Powershell or directly in your build script via a cake addin directive: ```csharp -#addin "Cake.Powershell" +#addin nuget:?package=Cake.Powershell&loaddependencies=true ``` diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 1b251a1..5cec9cd 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,6 @@ +### New in 4.0.0 (Released 2025/10/19) +* [Improvement] Update to Cake.Core v5.1.0 + ### New in 4.0.0 (Released 2024/07/09) * [Improvement] Update to Cake.Core v4.0.0 diff --git a/appveyor.ps1 b/appveyor.ps1 index baa4a9b..eaf175f 100644 --- a/appveyor.ps1 +++ b/appveyor.ps1 @@ -4,28 +4,19 @@ $arguments = "/S /v/qn" -Write-Host "Downloading .NET SDK 6.0 ..." -(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/0814dade-52c0-4f97-83f4-21f784b03a2e/6f0d4b4dc596824a365b63882982031b/dotnet-sdk-6.0.423-win-x64.exe','dotnet-sdk-6.0.423-win-x64.exe') - -Write-Host "Installing .NET SDK 6.0 ..." -$installerPath = "./dotnet-sdk-6.0.423-win-x64.exe" -Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait -Write-Host "Installation succeeded." -ForegroundColor Green - - -Write-Host "Downloading .NET SDK 7.0 ..." -(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/6f7abf5c-3f6d-43cc-8f3c-700c27d4976b/b7a3b806505c95c7095ca1e8c057e987/dotnet-sdk-7.0.410-win-x64.exe','dotnet-sdk-7.0.410-win-x64.exe') +Write-Host "Downloading .NET SDK 8.0 ..." +(New-Object System.Net.WebClient).DownloadFile('https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.415/dotnet-sdk-8.0.415-win-x64.exe','dotnet-sdk-8.0.415-win-x64.exe') -Write-Host "Installing .NET SDK 7.0 ..." -$installerPath = "./dotnet-sdk-7.0.410-win-x64.exe" +Write-Host "Installing .NET SDK 8.0 ..." +$installerPath = "./dotnet-sdk-8.0.415-win-x64.exe" Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait Write-Host "Installation succeeded." -ForegroundColor Green -Write-Host "Downloading .NET SDK 8.0 ..." -(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/b6f19ef3-52ca-40b1-b78b-0712d3c8bf4d/426bd0d376479d551ce4d5ac0ecf63a5/dotnet-sdk-8.0.302-win-x64.exe','dotnet-sdk-8.0.302-win-x64.exe') +Write-Host "Downloading .NET SDK 9.0 ..." +(New-Object System.Net.WebClient).DownloadFile('https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.306/dotnet-sdk-9.0.306-win-x64.exe','dotnet-sdk-9.0.306-win-x64.exe') -Write-Host "Installing .NET SDK 8.0 ..." -$installerPath = "./dotnet-sdk-8.0.302-win-x64.exe" +Write-Host "Installing .NET SDK 9.0 ..." +$installerPath = "./dotnet-sdk-9.0.306-win-x64.exe" Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait Write-Host "Installation succeeded." -ForegroundColor Green diff --git a/build.sh b/build.sh index 093272b..dece959 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) TOOLS_DIR=$SCRIPT_DIR/tools NUGET_EXE=$TOOLS_DIR/nuget.exe NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -CAKE_VERSION=1.0.0 +CAKE_VERSION=5.1.0 CAKE_EXE=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe # Temporarily skip verification of addins. diff --git a/global.json b/global.json index ac65223..3ed3152 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.302", + "version": "9.0.306", "rollForward": "latestMinor" } } \ No newline at end of file diff --git a/nuspec/Cake.Powershell.nuspec b/nuspec/Cake.Powershell.nuspec index 37433f3..b372d47 100644 --- a/nuspec/Cake.Powershell.nuspec +++ b/nuspec/Cake.Powershell.nuspec @@ -10,40 +10,34 @@ Powershell addon for cake build. https://github.com/SharpeRAD/Cake.Powershell/LICENSE https://github.com/SharpeRAD/Cake.Powershell + README.md https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png false Copyright (c) Phillip Sharpe 2015 Initial Release Cake cake-addin Script Build Powershell - - - - - + + - - + + + + + + + - - - - - - - - - - + diff --git a/src/Cake.Powershell.Tests/Cake.Powershell.Tests.csproj b/src/Cake.Powershell.Tests/Cake.Powershell.Tests.csproj index 303ca22..092e282 100644 --- a/src/Cake.Powershell.Tests/Cake.Powershell.Tests.csproj +++ b/src/Cake.Powershell.Tests/Cake.Powershell.Tests.csproj @@ -5,7 +5,7 @@ Cake.Powershell.Tests Library - net8.0;net7.0;net6.0 + net9.0;net8.0 false false @@ -19,21 +19,20 @@ - - + + - - - + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/src/Cake.Powershell.sln b/src/Cake.Powershell.sln index 3e0e718..ad31df3 100644 --- a/src/Cake.Powershell.sln +++ b/src/Cake.Powershell.sln @@ -41,6 +41,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Powershell", "Cake.Pow EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Powershell.Tests", "Cake.Powershell.Tests\Cake.Powershell.Tests.csproj", "{716440BD-3C10-493E-949F-8E94A063F9F8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{EC1C4490-0EA8-4DCC-BCE8-A87210CE13A5}" + ProjectSection(SolutionItems) = preProject + ..\.github\workflows\build.yml = ..\.github\workflows\build.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -62,6 +69,7 @@ Global GlobalSection(NestedProjects) = preSolution {ED3901EA-E3D2-488A-A66C-DC318DDC7089} = {EA42D027-E363-4943-ABED-1F3C37FD6CA5} {716440BD-3C10-493E-949F-8E94A063F9F8} = {307216F2-D982-4935-8BF1-842114D14545} + {EC1C4490-0EA8-4DCC-BCE8-A87210CE13A5} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7E0AF96A-1AA2-4477-921E-56FC38C8A055} diff --git a/src/Cake.Powershell/Cake.Powershell.csproj b/src/Cake.Powershell/Cake.Powershell.csproj index ae7cf17..fcac877 100644 --- a/src/Cake.Powershell/Cake.Powershell.csproj +++ b/src/Cake.Powershell/Cake.Powershell.csproj @@ -5,7 +5,7 @@ Cake.Powershell Library - net8.0;net7.0;net6.0 + net9.0;net8.0 false false @@ -19,9 +19,8 @@ - - - - + + + diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index fd67364..e5d961b 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -5,8 +5,8 @@ //------------------------------------------------------------------------------ using System.Reflection; -[assembly: AssemblyVersion("3.0.0")] -[assembly: AssemblyFileVersion("3.0.0")] -[assembly: AssemblyInformationalVersion("3.0.0")] +[assembly: AssemblyVersion("5.0.0")] +[assembly: AssemblyFileVersion("5.0.0")] +[assembly: AssemblyInformationalVersion("5.0.0")] [assembly: AssemblyCopyright("Copyright (c) 2015 - 2024 Phillip Sharpe")] diff --git a/test/build.cake b/test/build.cake index dc37c0f..7e2ce90 100644 --- a/test/build.cake +++ b/test/build.cake @@ -1,4 +1,4 @@ -#addin nuget:?package=Cake.Powershell +#addin nuget:?package=Cake.Powershell&loaddependencies=true ////////////////////////////////////////////////////////////////////// // ARGUMENTS