diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 50a3e3e038..3ad6694334 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "gitreleasemanager.tool": { - "version": "0.18.0", + "version": "0.20.0", "commands": [ "dotnet-gitreleasemanager" ] diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d71522864b..5f35c29825 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/dotnet:dev-8.0 +FROM mcr.microsoft.com/devcontainers/dotnet:dev-10.0 # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d2569415e2..69b116d50b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ "upgradePackages": "true" }, "ghcr.io/devcontainers/features/git:1": { - "version": "latest", + "version": "os-provided", "ppa": "false" }, "ghcr.io/devcontainers/features/powershell:1": { @@ -41,7 +41,7 @@ }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ - "ms-dotnettools.csharp", + "ms-dotnettools.csdevkit", "EditorConfig.EditorConfig", "streetsidesoftware.code-spell-checker" ] diff --git a/.editorconfig b/.editorconfig index cd66ed516f..709cd532da 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,16 +1,21 @@ +root = true # http://editorconfig.org # top-most EditorConfig file -root = true [*] indent_style = space indent_size = 4 end_of_line = lf -charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +# Microsoft .NET properties +dotnet_style_qualification_for_event = false:none +dotnet_style_qualification_for_field = false:none +dotnet_style_qualification_for_method = false:none +dotnet_style_qualification_for_property = false:none + [*.yml] indent_size = 2 @@ -59,19 +64,12 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_inferred_tuple_names = true:suggestion dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning dotnet_style_prefer_simplified_interpolation = true:suggestion - -# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones. -dotnet_diagnostic.IDE0005.severity = none -dotnet_diagnostic.IDE0067.severity = none -dotnet_diagnostic.IDE0068.severity = none -dotnet_diagnostic.IDE0069.severity = none -dotnet_diagnostic.CA1016.severity = none #### C# Coding Conventions #### # Prefer "var" everywhere -csharp_style_var_for_built_in_types = true:silent -csharp_style_var_when_type_is_apparent = true:silent -csharp_style_var_elsewhere = true:silent +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion # Prefer method-like constructs to have a block body, except for lambdas csharp_style_expression_bodied_methods = true:warning @@ -153,46 +151,32 @@ csharp_space_between_method_call_parameter_list_parentheses = false csharp_space_between_method_declaration_empty_parameter_list_parentheses = false csharp_space_between_method_declaration_name_and_open_parenthesis = false csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false csharp_space_between_square_brackets = false +resharper_csharp_use_roslyn_logic_for_evident_types = true + # Alignment -align_multiline_parameter = true +resharper_csharp_align_multiline_parameter = true # Qualify fields with "this." -csharp_instance_members_qualify_members = field - -# IDE0011: Add braces -dotnet_diagnostic.IDE0011.severity = none - -# IDE0090: Use 'new(...)' -dotnet_diagnostic.IDE0090.severity = warning - -# IDE0041: Use 'is null' check -dotnet_diagnostic.IDE0041.severity = warning +resharper_csharp_instance_members_qualify_members = field -# CA1825: Avoid zero-length array allocations -dotnet_diagnostic.CA1825.severity = warning +# IDE0005: Using directive is unnecessary. +dotnet_diagnostic.ide0005.severity = warning -# CA1822: Mark members as static -dotnet_diagnostic.CA1822.severity = warning +# RCS1037: Remove trailing white-space. +dotnet_diagnostic.rcs1037.severity = error -# CA2208: Instantiate argument exceptions correctly -dotnet_diagnostic.CA2208.severity = warning +# RCS1036: Remove redundant empty line. +dotnet_diagnostic.rcs1036.severity = error -# CA1810: Initialize reference type static fields inline -dotnet_diagnostic.CA1810.severity = warning +dotnet_diagnostic.S2325.severity = none +dotnet_diagnostic.S4136.severity = none -# CA1816: Dispose methods should call SuppressFinalize -dotnet_diagnostic.CA1816.severity = warning +xml_space_before_self_closing = true -# IDE0005: Using directive is unnecessary. -dotnet_diagnostic.IDE0005.severity = warning +resharper_arrange_object_creation_when_type_not_evident_highlighting = none -# RCS1037: Remove trailing white-space. -dotnet_diagnostic.RCS1037.severity = error - -# RCS1036: Remove redundant empty line. -dotnet_diagnostic.RCS1036.severity = error +resharper_unused_auto_property_accessor_global_highlighting = none -[resharper_]xml_space_before_self_closing = true \ No newline at end of file +resharper_unused_method_return_value_global_highlighting = none diff --git a/.gitattributes b/.gitattributes index 9a5cb22250..14ce78d666 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,6 +11,7 @@ # Custom for Visual Studio *.cs diff=csharp *.sln +*.slnx *.csproj *.vbproj *.fsproj diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4f351aa9c3..21d268617f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,40 +1,49 @@ - + ## Description - + ## Related Issue - + +This project only accepts pull requests related to open issues. +If suggesting a new feature or change, please discuss it in an issue first. +If fixing a bug, there should be an issue describing it with steps to reproduce. +Please replace "XYZ" below with the issue number that is being resolved by this +pull request. - +--> - +Resolves #XYZ ## Motivation and Context - + ## How Has This Been Tested? - + +Include details of your testing environment, and the tests you ran to +see how your change affects other areas of the code, etc. +Please describe in detail how you tested your changes. - +--> ## Screenshots (if appropriate): - + ## Checklist: - + +Go over all the following points, and put an `x` in all the boxes that apply. +If you're unsure about any of these, don't hesitate to ask. We're here to help! + +--> * \[ ] My code follows the code style of this project. * \[ ] My change requires a change to the documentation. diff --git a/.github/actions/artifacts-attest/action.yml b/.github/actions/artifacts-attest/action.yml index a1d424e510..7722489c36 100644 --- a/.github/actions/artifacts-attest/action.yml +++ b/.github/actions/artifacts-attest/action.yml @@ -6,7 +6,7 @@ runs: steps: - name: 'Attestation' - uses: actions/attest-build-provenance@v1 + uses: actions/attest-build-provenance@v2.0.1 with: subject-path: | ${{ github.workspace }}/artifacts/packages/native diff --git a/.github/actions/docker-manifests/action.yml b/.github/actions/docker-manifests/action.yml index 7bf0945382..23de24c989 100644 --- a/.github/actions/docker-manifests/action.yml +++ b/.github/actions/docker-manifests/action.yml @@ -1,10 +1,10 @@ name: 'Docker Manifests' description: 'Docker Publish Manifests' inputs: - dockerDistro: + docker_distro: description: 'Linux Distro' required: true - dotnetVersion: + dotnet_version: description: '.net version' required: true docker_registry_username: @@ -32,7 +32,10 @@ runs: - name: '[Docker Publish Manifests] DockerHub' shell: pwsh - run: dotnet run/docker.dll --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub + run: | + dotnet run/docker.dll ` + --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub - name: Login to GitHub uses: docker/login-action@v3 @@ -43,4 +46,7 @@ runs: - name: '[Docker Publish Manifests] GitHub' shell: pwsh - run: dotnet run/docker.dll --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github + run: | + dotnet run/docker.dll ` + --target=DockerManifest --arch=amd64 --arch=arm64 --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry github diff --git a/.github/actions/docker-publish/action.yml b/.github/actions/docker-publish/action.yml index d65fbe5aee..e5f2e05757 100644 --- a/.github/actions/docker-publish/action.yml +++ b/.github/actions/docker-publish/action.yml @@ -4,10 +4,10 @@ inputs: arch: description: 'Docker architecture' required: true - dockerDistro: + docker_distro: description: 'Linux Distro' required: true - dotnetVersion: + dotnet_version: description: '.net version' required: true docker_registry_username: @@ -35,7 +35,10 @@ runs: - name: '[Docker Publish] DockerHub' shell: pwsh - run: dotnet run/docker.dll --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic + run: | + dotnet run/docker.dll ` + --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic - name: Login to GitHub uses: docker/login-action@v3 @@ -46,4 +49,7 @@ runs: - name: '[Docker Publish] GitHub' shell: pwsh - run: dotnet run/docker.dll --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic + run: | + dotnet run/docker.dll ` + --target=DockerPublish --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic diff --git a/.github/actions/docker-setup/action.yml b/.github/actions/docker-setup/action.yml new file mode 100644 index 0000000000..7b75cebdfd --- /dev/null +++ b/.github/actions/docker-setup/action.yml @@ -0,0 +1,16 @@ +name: 'Docker Setup' +description: 'Setups the docker engine' + +runs: + using: 'composite' + steps: + - name: Set up Docker + uses: docker/setup-docker-action@v4 + with: + daemon-config: '{ "features": { "containerd-snapshotter": true } }' + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: 'latest' + driver-opts: 'image=moby/buildkit:buildx-stable-1' + install: true diff --git a/.github/actions/docker-test/action.yml b/.github/actions/docker-test/action.yml index 7e450d2d8e..5b8e20bba2 100644 --- a/.github/actions/docker-test/action.yml +++ b/.github/actions/docker-test/action.yml @@ -4,10 +4,10 @@ inputs: arch: description: 'Docker architecture' default: 'amd64' - dockerDistro: + docker_distro: description: 'Linux Distro' default: 'debian.12' - dotnetVersion: + dotnet_version: description: '.net version' default: '8.0' @@ -16,9 +16,25 @@ runs: steps: - name: '[Docker Build & Test] DockerHub' - shell: pwsh - run: dotnet run/docker.dll --target=DockerTest --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry dockerhub --verbosity=diagnostic + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + dotnet run/docker.dll --target=DockerTest ` + --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic - name: '[Docker Build & Test] GitHub' - shell: pwsh - run: dotnet run/docker.dll --target=DockerTest --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnetVersion }} --docker_distro=${{ inputs.dockerDistro }} --docker_registry github --verbosity=diagnostic + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + dotnet run/docker.dll --target=DockerTest ` + --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` + --docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic diff --git a/.github/chatmodes/plan.chatmode.md b/.github/chatmodes/plan.chatmode.md new file mode 100644 index 0000000000..57ced4af97 --- /dev/null +++ b/.github/chatmodes/plan.chatmode.md @@ -0,0 +1,114 @@ +--- +description: 'Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies.' +tools: ['codebase', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'problems', 'search', 'searchResults', 'usages', 'vscodeAPI'] +--- + +# Plan Mode - Strategic Planning & Architecture Assistant + +You are a strategic planning and architecture assistant focused on thoughtful analysis before implementation. Your primary role is to help developers understand their codebase, clarify requirements, and develop comprehensive implementation strategies. + +## Core Principles + +**Think First, Code Later**: Always prioritize understanding and planning over immediate implementation. Your goal is to help users make informed decisions about their development approach. + +**Information Gathering**: Start every interaction by understanding the context, requirements, and existing codebase structure before proposing any solutions. + +**Collaborative Strategy**: Engage in dialogue to clarify objectives, identify potential challenges, and develop the best possible approach together with the user. + +## Your Capabilities & Focus + +### Information Gathering Tools +- **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture +- **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project +- **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase +- **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints +- **Test Analysis**: Use `findTestFiles` to understand testing patterns and coverage +- **External Research**: Use `fetch` to access external documentation and resources +- **Repository Context**: Use `githubRepo` to understand project history and collaboration patterns +- **VSCode Integration**: Use `vscodeAPI` and `extensions` tools for IDE-specific insights +- **External Services**: Use MCP tools like `mcp-atlassian` for project management context and `browser-automation` for web-based research + +### Planning Approach +- **Requirements Analysis**: Ensure you fully understand what the user wants to accomplish +- **Context Building**: Explore relevant files and understand the broader system architecture +- **Constraint Identification**: Identify technical limitations, dependencies, and potential challenges +- **Strategy Development**: Create comprehensive implementation plans with clear steps +- **Risk Assessment**: Consider edge cases, potential issues, and alternative approaches + +## Workflow Guidelines + +### 1. Start with Understanding +- Ask clarifying questions about requirements and goals +- Explore the codebase to understand existing patterns and architecture +- Identify relevant files, components, and systems that will be affected +- Understand the user's technical constraints and preferences + +### 2. Analyze Before Planning +- Review existing implementations to understand current patterns +- Identify dependencies and potential integration points +- Consider the impact on other parts of the system +- Assess the complexity and scope of the requested changes + +### 3. Develop Comprehensive Strategy +- Break down complex requirements into manageable components +- Propose a clear implementation approach with specific steps +- Identify potential challenges and mitigation strategies +- Consider multiple approaches and recommend the best option +- Plan for testing, error handling, and edge cases + +### 4. Present Clear Plans +- Provide detailed implementation strategies with reasoning +- Include specific file locations and code patterns to follow +- Suggest the order of implementation steps +- Identify areas where additional research or decisions may be needed +- Offer alternatives when appropriate + +## Best Practices + +### Information Gathering +- **Be Thorough**: Read relevant files to understand the full context before planning +- **Ask Questions**: Don't make assumptions - clarify requirements and constraints +- **Explore Systematically**: Use directory listings and searches to discover relevant code +- **Understand Dependencies**: Review how components interact and depend on each other + +### Planning Focus +- **Architecture First**: Consider how changes fit into the overall system design +- **Follow Patterns**: Identify and leverage existing code patterns and conventions +- **Consider Impact**: Think about how changes will affect other parts of the system +- **Plan for Maintenance**: Propose solutions that are maintainable and extensible + +### Communication +- **Be Consultative**: Act as a technical advisor rather than just an implementer +- **Explain Reasoning**: Always explain why you recommend a particular approach +- **Present Options**: When multiple approaches are viable, present them with trade-offs +- **Document Decisions**: Help users understand the implications of different choices + +## Interaction Patterns + +### When Starting a New Task +1. **Understand the Goal**: What exactly does the user want to accomplish? +2. **Explore Context**: What files, components, or systems are relevant? +3. **Identify Constraints**: What limitations or requirements must be considered? +4. **Clarify Scope**: How extensive should the changes be? + +### When Planning Implementation +1. **Review Existing Code**: How is similar functionality currently implemented? +2. **Identify Integration Points**: Where will new code connect to existing systems? +3. **Plan Step-by-Step**: What's the logical sequence for implementation? +4. **Consider Testing**: How can the implementation be validated? + +### When Facing Complexity +1. **Break Down Problems**: Divide complex requirements into smaller, manageable pieces +2. **Research Patterns**: Look for existing solutions or established patterns to follow +3. **Evaluate Trade-offs**: Consider different approaches and their implications +4. **Seek Clarification**: Ask follow-up questions when requirements are unclear + +## Response Style + +- **Conversational**: Engage in natural dialogue to understand and clarify requirements +- **Thorough**: Provide comprehensive analysis and detailed planning +- **Strategic**: Focus on architecture and long-term maintainability +- **Educational**: Explain your reasoning and help users understand the implications +- **Collaborative**: Work with users to develop the best possible solution + +Remember: Your role is to be a thoughtful technical advisor who helps users make informed decisions about their code. Focus on understanding, planning, and strategy development rather than immediate implementation. diff --git a/.github/chatmodes/planner.chatmode.md b/.github/chatmodes/planner.chatmode.md new file mode 100644 index 0000000000..baf3afb8ac --- /dev/null +++ b/.github/chatmodes/planner.chatmode.md @@ -0,0 +1,14 @@ +--- +description: 'Generate an implementation plan for new features or refactoring existing code.' +tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages'] +--- +# Planning mode instructions +You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code. +Don't make any code edits, just generate a plan. + +The plan consists of a Markdown document that describes the implementation plan, including the following sections: + +* Overview: A brief description of the feature or refactoring task. +* Requirements: A list of requirements for the feature or refactoring task. +* Implementation Steps: A detailed list of steps to implement the feature or refactoring task. +* Testing: A list of tests that need to be implemented to verify the feature or refactoring task. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f74944833f..87b6a493c0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,65 +1,75 @@ version: 2 updates: -- package-ecosystem: dotnet-sdk - labels: + - package-ecosystem: dotnet-sdk + labels: - "dependencies" - commit-message: + commit-message: + prefix: "(sdk)" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 * * *" + - package-ecosystem: nuget + labels: + - "dependencies" + commit-message: prefix: "(deps)" - directory: "/" - schedule: - interval: daily -- package-ecosystem: nuget - labels: - - "dependencies" - commit-message: - prefix: "(deps)" - groups: - microsoft: - patterns: - - "Microsoft.*" - - "System.*" - analyzers: - patterns: - - "*Analyzers" - serilog: + groups: + microsoft: + patterns: + - "Microsoft.*" + - "System.*" + Microsoft_CodeAnalysis: + patterns: + - "Microsoft.CodeAnalysis.*" + analyzers: + patterns: + - "*Analyzers" + serilog: + patterns: + - "Serilog.*" + nunit: + patterns: + - "NUnit.*" + LibGit2Sharp: patterns: - - "Serilog.*" - nunit: - patterns: - - "NUnit.*" - directories: - - "/build" - - "/new-cli" - - "/src" - - "/" - ignore: - - dependency-name: "LibGit2Sharp" - schedule: - interval: daily - open-pull-requests-limit: 10 + - "LibGit2Sharp.*" + JsonSchemaNet: + patterns: + - "JsonSchemaNet.*" + directories: + - "/build" + - "/new-cli" + - "/src" + schedule: + interval: cron + cronjob: "0 12 * * *" + open-pull-requests-limit: 10 + + - package-ecosystem: github-actions + labels: + - "dependencies" + commit-message: + prefix: "(build deps)" + groups: + actions: + patterns: + - "actions/*" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 * * *" -- package-ecosystem: github-actions - labels: - - "dependencies" - commit-message: - prefix: "(build deps)" - groups: - actions: - patterns: - - "actions/*" - directory: "/" - schedule: - interval: daily - -- package-ecosystem: npm - labels: - - "dependencies" - commit-message: - prefix: "(docs deps)" - groups: - remark: - patterns: - - "remark*" - directory: "/" - schedule: - interval: monthly + - package-ecosystem: npm + labels: + - "dependencies" + commit-message: + prefix: "(docs deps)" + groups: + remark: + patterns: + - "remark*" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 1,15 * *" diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index ceb3e7c969..a0633f41d0 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -7,47 +7,60 @@ on: arch: required: true type: string - dockerDistros: + docker_distros: required: true type: string - dotnetVersions: + dotnet_versions: required: true type: string + env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: artifacts: - name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }} + name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }} runs-on: ${{ inputs.runner }} strategy: fail-fast: false - matrix: - dockerDistro: ${{ fromJson(inputs.dockerDistros) }} - dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} + matrix: + docker_distro: ${{ fromJson(inputs.docker_distros) }} + dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download native packages with: name: native-Linux path: ${{ github.workspace }}/artifacts/packages/native + - + name: Set up Docker + uses: ./.github/actions/docker-setup - name: '[Test Artifacts]' - shell: pwsh - run: dotnet run/artifacts.dll --target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnetVersion }} --docker_distro=${{ matrix.dockerDistro }} \ No newline at end of file + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + dotnet run/artifacts.dll ` + --target=ArtifactsTest --arch=${{ inputs.arch }} ` + --dotnet_version=${{ matrix.dotnet_version }} ` + --docker_distro=${{ matrix.docker_distro }} diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml index 6c1832961e..31486885be 100644 --- a/.github/workflows/_artifacts_windows.yml +++ b/.github/workflows/_artifacts_windows.yml @@ -8,7 +8,7 @@ env: jobs: artifacts: name: ${{ matrix.package }} - runs-on: windows-latest + runs-on: windows-2025 strategy: fail-fast: false matrix: @@ -17,14 +17,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index 75ed54e3c2..835f7f8f7e 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -11,13 +11,13 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-15] + os: [windows-2025, ubuntu-24.04, macos-15] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -29,22 +29,22 @@ jobs: run: dotnet run/build.dll --target=Package - name: 'Upload nuget packages' - uses: actions/upload-artifact@v4 - if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v5 + if: matrix.os == 'windows-2025' with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - name: 'Upload native packages' - uses: actions/upload-artifact@v4 - if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v5 + if: matrix.os == 'windows-2025' with: name: native-${{ runner.os }} path: ${{ github.workspace }}/artifacts/packages/native/*.zip - name: 'Upload native packages' - uses: actions/upload-artifact@v4 - if: matrix.os != 'windows-latest' + uses: actions/upload-artifact@v5 + if: matrix.os != 'windows-2025' with: name: native-${{ runner.os }} path: ${{ github.workspace }}/artifacts/packages/native/*.tar.gz diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index 8514377ad6..b070134d5f 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -7,71 +7,60 @@ on: arch: required: true type: string - dockerDistros: + docker_distros: required: true type: string - dotnetVersions: + dotnet_versions: required: true type: string + env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" jobs: docker: - name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }} + name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }} runs-on: ${{ inputs.runner }} strategy: fail-fast: false matrix: - dockerDistro: ${{ fromJson(inputs.dockerDistros) }} - dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} + docker_distro: ${{ fromJson(inputs.docker_distros) }} + dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - name: Set up Docker - uses: docker/setup-docker-action@v4 - with: - daemon-config: '{ "features": { "containerd-snapshotter": true } }' - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: 'latest' - driver-opts: 'image=moby/buildkit:buildx-stable-1' - install: true + uses: ./.github/actions/docker-setup - name: Docker Test if: success() && github.event_name == 'pull_request' || github.repository_owner != 'GitTools' uses: ./.github/actions/docker-test with: arch: ${{ inputs.arch }} - dockerDistro: ${{ matrix.dockerDistro }} - dotnetVersion: ${{ matrix.dotnetVersion }} + docker_distro: ${{ matrix.docker_distro }} + dotnet_version: ${{ matrix.dotnet_version }} - name: Docker Publish if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main' uses: ./.github/actions/docker-publish with: arch: ${{ inputs.arch }} - dockerDistro: ${{ matrix.dockerDistro }} - dotnetVersion: ${{ matrix.dotnetVersion }} + docker_distro: ${{ matrix.docker_distro }} + dotnet_version: ${{ matrix.dotnet_version }} docker_registry_username: ${{ secrets.DOCKER_USERNAME }} docker_registry_password: ${{ secrets.DOCKER_PASSWORD }} github_registry_username: ${{ github.repository_owner }} diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml index 2e72c53e51..e3738909be 100644 --- a/.github/workflows/_docker_manifests.yml +++ b/.github/workflows/_docker_manifests.yml @@ -1,29 +1,30 @@ on: workflow_call: inputs: - dockerDistros: + docker_distros: required: true type: string - dotnetVersions: + dotnet_versions: required: true type: string + env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" jobs: manifest: - name: ${{ matrix.dockerDistro }} - net${{ matrix.dotnetVersion }} - runs-on: ubuntu-latest + name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }} + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - dockerDistro: ${{ fromJson(inputs.dockerDistros) }} - dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} + docker_distro: ${{ fromJson(inputs.docker_distros) }} + dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -31,26 +32,14 @@ jobs: uses: ./.github/actions/cache-restore - name: Set up Docker - uses: docker/setup-docker-action@v4 - with: - daemon-config: '{ "features": { "containerd-snapshotter": true } }' - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: 'latest' - driver-opts: 'image=moby/buildkit:buildx-stable-1' - install: true + uses: ./.github/actions/docker-setup - name: Docker Manifests if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main' uses: ./.github/actions/docker-manifests with: - dockerDistro: ${{ matrix.dockerDistro }} - dotnetVersion: ${{ matrix.dotnetVersion }} + docker_distro: ${{ matrix.docker_distro }} + dotnet_version: ${{ matrix.dotnet_version }} docker_registry_username: ${{ secrets.DOCKER_USERNAME }} docker_registry_password: ${{ secrets.DOCKER_PASSWORD }} github_registry_username: ${{ github.repository_owner }} diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 5c5d485933..ffe8340d47 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -1,25 +1,30 @@ on: workflow_call: outputs: - dockerDistros: + docker_distros: description: 'List of Docker distros' - value: ${{ jobs.set_matrix.outputs.dockerDistros }} - dotnetVersions: + value: ${{ jobs.set_matrix.outputs.docker_distros }} + dotnet_versions: description: 'List of .NET versions' - value: ${{ jobs.set_matrix.outputs.dotnetVersions }} + value: ${{ jobs.set_matrix.outputs.dotnet_versions }} + +env: + DOTNET_INSTALL_DIR: "./.dotnet" + DOTNET_ROLL_FORWARD: "Major" + jobs: prepare: name: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-15] + os: [windows-2025, ubuntu-24.04, macos-15] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Cache cake frosting id: cache-cake @@ -35,13 +40,13 @@ jobs: key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Build]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Prepare]' shell: pwsh @@ -49,14 +54,14 @@ jobs: set_matrix: needs: [ prepare ] name: Set Matrix - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: - dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }} - dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }} + docker_distros: ${{ steps.set_matrix.outputs.docker_distros }} + dotnet_versions: ${{ steps.set_matrix.outputs.dotnet_versions }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Restore State uses: ./.github/actions/cache-restore diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index d9aec579e7..c8af9ec576 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -4,11 +4,11 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: publish: name: ${{ matrix.taskName }} - runs-on: windows-latest + runs-on: windows-2025 strategy: fail-fast: false matrix: @@ -21,19 +21,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget + - name: '[Publish]' shell: pwsh - run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} \ No newline at end of file + run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index f4925b5f59..f12e689fc3 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -1,42 +1,47 @@ on: workflow_call: inputs: - dotnetVersions: + dotnet_versions: required: true type: string env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: unit_test: - name: ${{ matrix.os }} - net${{ matrix.dotnetVersion }} + name: ${{ matrix.os }} - net${{ matrix.dotnet_version }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-15] - dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} + os: [ windows-2025, ubuntu-24.04, macos-15 ] + dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - - name: '[Unit Test]' - shell: pwsh - run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnetVersion }} + + - name: '[Unit Test]' + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: 'dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}' - name: Test Summary uses: test-summary/action@v2.4 - if: matrix.dotnetVersion == '9.0' + if: always() && matrix.dotnet_version == '10.0' with: paths: artifacts/test-results/*.results.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 504a339b9f..0ecebfe4a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ on: - '!docs/**' merge_group: types: [checks_requested] - + repository_dispatch: types: [ ci-release ] @@ -43,7 +43,7 @@ jobs: prepare: name: Prepare uses: ./.github/workflows/_prepare.yml - + build: name: Build & Package needs: [ prepare ] @@ -54,7 +54,7 @@ jobs: needs: [ prepare ] uses: ./.github/workflows/_unit_tests.yml with: - dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} + dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} secrets: inherit artifacts_windows_test: @@ -70,15 +70,15 @@ jobs: matrix: include: - arch: amd64 - runner: ubuntu-latest + runner: ubuntu-24.04 - arch: arm64 - runner: ubuntu-latest + runner: ubuntu-24.04-arm uses: ./.github/workflows/_artifacts_linux.yml with: runner: ${{ matrix.runner }} arch: ${{ matrix.arch }} - dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} - dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} + docker_distros: ${{ needs.prepare.outputs.docker_distros }} + dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} docker_linux_images: needs: [ prepare, build ] @@ -88,16 +88,16 @@ jobs: matrix: include: - arch: amd64 - runner: ubuntu-latest + runner: ubuntu-24.04 - arch: arm64 - runner: ubuntu-latest + runner: ubuntu-24.04-arm uses: ./.github/workflows/_docker.yml with: runner: ${{ matrix.runner }} arch: ${{ matrix.arch }} - dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} - dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} + docker_distros: ${{ needs.prepare.outputs.docker_distros }} + dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} secrets: inherit docker_linux_manifests: @@ -105,8 +105,8 @@ jobs: name: Docker Manifests uses: ./.github/workflows/_docker_manifests.yml with: - dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} - dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} + docker_distros: ${{ needs.prepare.outputs.docker_distros }} + dotnet_versions: ${{ needs.prepare.outputs.dotnet_versions }} secrets: inherit publish: @@ -118,13 +118,13 @@ jobs: release: name: Release needs: [ publish, docker_linux_manifests ] - runs-on: windows-latest + runs-on: windows-2025 env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -135,11 +135,11 @@ jobs: uses: ./.github/actions/artifacts-restore - name: Attetstation - if: ${{ github.event_name == 'repository_dispatch' }} + if: github.event_name == 'repository_dispatch' uses: ./.github/actions/artifacts-attest - name: DockerHub Publish Readme - if: ${{ github.event_name == 'repository_dispatch' }} + if: github.event_name == 'repository_dispatch' shell: pwsh run: dotnet run/docker.dll --target=DockerHubReadmePublish env: @@ -151,10 +151,10 @@ jobs: run: dotnet run/release.dll --target=PublishRelease - name: '[Publish Release]' - if: ${{ github.event_name == 'repository_dispatch' }} - uses: peter-evans/repository-dispatch@v3 + if: github.event_name == 'repository_dispatch' + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} event-type: publish-release - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}' \ No newline at end of file + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b05b693cd2..1966b69e27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: contents: read # for actions/checkout to fetch code security-events: write # for github/codeql-action/analyze to upload SARIF results name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -49,14 +49,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} + tools: linked - name: Cache cake frosting @@ -68,13 +69,13 @@ jobs: - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Prepare]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Build]' @@ -82,4 +83,4 @@ jobs: run: dotnet run/build.dll --target=BuildPrepare --exclusive - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 271abaebcc..3c3aa34a9c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,12 +33,12 @@ env: jobs: prepare: name: Prepare Build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -72,13 +72,13 @@ jobs: restore-keys: node-${{ runner.os }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Build]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Prepare]' shell: pwsh @@ -87,11 +87,11 @@ jobs: validate: name: Validates Html needs: [ prepare ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -123,14 +123,14 @@ jobs: publish: name: Publish docs needs: [ validate ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} GITHUB_USERNAME: ${{ github.actor }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -142,11 +142,6 @@ jobs: run: dotnet run/docs.dll --target=GenerateSchemas - name: '[Publish Documentation]' - if: ${{ github.event_name == 'repository_dispatch' }} - shell: pwsh - run: dotnet run/docs.dll --target=PublishDocs - - - name: '[Publish Documentation]' - if: ${{ github.event_name == 'workflow_dispatch' }} + if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' shell: pwsh run: dotnet run/docs.dll --target=PublishDocs --force diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 2e61a314b0..8c2ba5f079 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -34,26 +34,20 @@ env: jobs: format: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: DotNet Format steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: Run Format 'ci' solution run: dotnet format ./build/ --verify-no-changes - - - name: Build 'new-cli' solution - run: dotnet build ./new-cli - - - name: Run Format 'new-cli' solution - run: dotnet format ./new-cli/ --exclude ~/.nuget/packages --verify-no-changes - name: Run Format 'GitVersion' solution run: dotnet format ./src/ --exclude **/AddFormats/ --verify-no-changes diff --git a/.github/workflows/gittools-actions.yml b/.github/workflows/gittools-actions.yml new file mode 100644 index 0000000000..8d5bcd04eb --- /dev/null +++ b/.github/workflows/gittools-actions.yml @@ -0,0 +1,43 @@ +name: Update GitTools Actions + +on: + workflow_dispatch: + inputs: + tag-name: + description: 'Tag name to use for the release' + required: true + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Update GitTools Actions + runs-on: ubuntu-24.04 + steps: + - + name: Get version + id: get-version + shell: pwsh + run: | + $version = "${{ github.event.client_payload.tag }}" + if ($version -eq "") { + $version = "${{ github.event.inputs.tag-name }}" + } + "version=$version" >> $env:GITHUB_OUTPUT + - + uses: peter-evans/repository-dispatch@v4 + name: Update GitTools Actions + with: + token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + repository: ${{ github.repository_owner }}/actions + event-type: gitversion-release-published + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}' diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 12cfa22056..3f3ee536b2 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -19,7 +19,8 @@ jobs: name: Bump Homebrew formula runs-on: macos-latest steps: - - name: Get version + - + name: Get version id: get-version shell: pwsh run: | @@ -27,7 +28,7 @@ jobs: if ($version -eq "") { $version = "${{ github.event.inputs.tag-name }}" } - "version=$version" >> $env:GITHUB_OUTPUT + "version=$version" >> $env:GITHUB_OUTPUT - uses: mislav/bump-homebrew-formula-action@v3 name: Bump Homebrew formula @@ -40,4 +41,4 @@ jobs: For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }} env: - COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} \ No newline at end of file + COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 9182452b60..526427a09b 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -1,47 +1,69 @@ name: Markdown Update on: push: + branches: + - main + - 'fix/*' + - 'feature/*' + - 'poc/*' + - 'support/*' + paths: + - 'docs/**' + + pull_request: + branches: + - main + - 'support/*' + paths: + - 'docs/**' env: DOTNET_ROLL_FORWARD: "Major" DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: 1 - + defaults: run: shell: pwsh - + jobs: docs: name: Update Markdown (embedded snippets) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 + if: github.event_name == 'push' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Checkout + uses: actions/checkout@v6 + if: github.event_name == 'pull_request' - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - - + - name: Run MarkdownSnippets run: | dotnet tool install --global MarkdownSnippets.Tool mdsnippets --write-header false working-directory: ${{ github.workspace }}/docs/input - - + - name: Check for changes id: status run: | if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } - - + - name: Push changes run: | git add --verbose . - git config user.name 'Artur Stolear' - git config user.email 'artur.stolear@gmail.com' + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' git commit -m 'Docs changes' --allow-empty git push --force - if: steps.status.outputs.has_changes == '1' \ No newline at end of file + if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml new file mode 100644 index 0000000000..5fd7034189 --- /dev/null +++ b/.github/workflows/new-cli.yml @@ -0,0 +1,56 @@ +name: Build (new-cli) +on: + push: + branches: + - main + - 'fix/*' + - 'feature/*' + - 'poc/*' + - 'support/*' + paths: + - '**' + - '!docs/**' + - '!.github/**' + - .github/workflows/new-cli.yml + + pull_request: + branches: + - main + - 'support/*' + paths: + - '**' + - '!docs/**' + - '!.github/**' + - .github/workflows/new-cli.yml + +permissions: + contents: read + +env: + DOTNET_ROLL_FORWARD: "Major" + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_NOLOGO: 1 + +jobs: + format: + runs-on: ubuntu-24.04 + name: Build & Test (new-cli) + steps: + - + name: Checkout + uses: actions/checkout@v6 + - + name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + global-json-file: global.json + - + name: Build 'new-cli' solution + run: dotnet build ./new-cli + - + name: Run Format 'new-cli' solution + run: dotnet format ./new-cli --exclude ~/.nuget/packages --verify-no-changes + - + name: Test 'new-cli' solution + run: dotnet test ./new-cli --no-build --verbosity normal diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml new file mode 100644 index 0000000000..418c45f7c0 --- /dev/null +++ b/.github/workflows/public-api.yml @@ -0,0 +1,44 @@ +name: Mark public API as shipped + +on: + workflow_dispatch: + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Mark public API as shipped + runs-on: ubuntu-24.04 + steps: + - + name: Checkout + uses: actions/checkout@v6 + if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Mark public API as shipped + run: ./src/mark-shipped.ps1 + - + name: Check for changes + id: status + run: | + if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } + - + name: Push changes + run: | + git add --verbose . + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' + git commit -m 'Mark public API as shipped' --allow-empty + git push --force + if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml new file mode 100644 index 0000000000..76daa8ccbf --- /dev/null +++ b/.github/workflows/qodana_analysis.yml @@ -0,0 +1,35 @@ +name: Qodana +on: + workflow_dispatch: + push: + branches: + - main + - 'fix/*' + - 'feature/*' +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - + name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + global-json-file: global.json + - + name: 'Qodana Scan' + uses: jetbrains/qodana-action@v2025.2.2 + with: + args: --baseline,qodana.sarif.json + cache-default-branch-only: true + pr-mode: true + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 033d0c2dbd..521ac0f921 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,11 +6,11 @@ on: jobs: release: name: Trigger ci flow - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Get version id: get-version @@ -20,7 +20,7 @@ jobs: $VERSION="${{ github.ref }}".Replace("refs/tags/", "") "version=$VERSION" >> $env:GITHUB_OUTPUT - - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b6b44be7cf..268a3c6c3f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,9 +11,9 @@ permissions: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: operations-per-run: 100 # set 'stale' label diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index 1f9e75b3ce..f6ad004ed9 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -17,7 +17,7 @@ jobs: permissions: contents: none name: Bump winget manifest - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Get version id: get-version diff --git a/.gitignore b/.gitignore index e5775f626a..dfc424aaaa 100644 --- a/.gitignore +++ b/.gitignore @@ -61,7 +61,6 @@ TestResults ClientBin stylecop.* ~$* -*~ *.dbmdl site/ Generated_Code #added for RIA/Silverlight projects @@ -84,10 +83,8 @@ Thumbs.db Desktop.ini _NCrunch_GitVersion -GitVersion.sln.ide/ .vs/ Packages/ -site/ /TestResult.xml ################ @@ -95,8 +92,6 @@ site/ ################ .idea -*.sln.iml - #################### # Visual Studio Code @@ -136,3 +131,5 @@ node_modules dogfood/ new-cli/log.txt + +new-cli/logs/ diff --git a/GitVersion.yml b/.gitversion.yml similarity index 100% rename from GitVersion.yml rename to .gitversion.yml diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 93e2285091..e1ab2c4975 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -1,3 +1,7 @@ +## v6.2.0 + +* The configuration property `label-number-pattern` was removed. The functionality can be still used by changing the label and the branch name regular expression for pull-request branches. + ## v6.0.0 ### Platforms @@ -60,7 +64,7 @@ * The `useBranchName` magic string has been removed. Instead use `{BranchName}` for `label`. * The `BranchPrefixToTrim` configuration property has been removed. `RegularExpression` is now used to capture named groups instead. - * Default `RegularExpression` for feature branches is changed from `^features?[/-]` to `^features?[/-](?.+)` to support using `{BranchName}` out-of-the-box + * Default `RegularExpression` for feature branches is changed from `^features?[\/-]` to `^features?[\/-](?.+)` to support using `{BranchName}` out-of-the-box * Default `RegularExpression` for unknown branches is changed from `.*` to `(?.+)` to support using `{BranchName}` out-of-the-box * The `Mainline` mode and the related implementation has been removed completely. The new `Mainline` version strategy should be used instead. diff --git a/GitReleaseManager.yml b/GitReleaseManager.yml index 5a85f67383..8e0b3fb546 100644 --- a/GitReleaseManager.yml +++ b/GitReleaseManager.yml @@ -31,6 +31,7 @@ create: sha-section-heading: "SHA256 Hashes of the release artifacts" sha-section-line-format: "- `{1}\t- {0}`" allow-update-to-published: true + include-contributors: true close: use-issue-comments: true issue-comment: |- diff --git a/build/.run/Artifacts DotnetTool Test.run.xml b/build/.run/Artifacts DotnetTool Test.run.xml index f09edd6a7e..ac637febb2 100644 --- a/build/.run/Artifacts DotnetTool Test.run.xml +++ b/build/.run/Artifacts DotnetTool Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Artifacts Executable Test.run.xml b/build/.run/Artifacts Executable Test.run.xml index 85538064f0..6e783555c6 100644 --- a/build/.run/Artifacts Executable Test.run.xml +++ b/build/.run/Artifacts Executable Test.run.xml @@ -15,9 +15,9 @@