Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .NET Projects in Release Please Action Release Types Supported #1002

Open
oricawalid opened this issue May 31, 2024 · 3 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@oricawalid
Copy link

oricawalid commented May 31, 2024

Is your feature request related to a problem? Please describe.
Yes, the problem is that the current Release Please GitHub Action does not support .NET projects. This limitation makes it challenging for developers using .NET to automate release notes generation and versioning, a feature widely available for other languages like Node.js, Python, etc.

Describe the solution you'd like
I would like the Release Please GitHub Action to include support for .NET projects. This should handle versioning within .csproj, .fsproj, or .vbproj files and generate release notes based on conventional commits.

Describe alternatives you've considered
An alternative has been manually updating project files and generating release notes, which is error-prone and time-consuming. Another option could be using separate tools for versioning and changelog generation, but this lacks the integration and ease of use that a single GitHub Action could offer. I'm current using simple.

Additional context
Adding .NET support would significantly benefit the .NET developer community by providing tooling consistency across different technology stacks and streamlining the release process in CI/CD pipelines for .NET applications.

Thank you very much for all your hard work and efforts. I highly appreciated.

@oricawalid oricawalid added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels May 31, 2024
@oricawalid
Copy link
Author

Any updates?

@florimm
Copy link

florimm commented Oct 24, 2024

Will love to have this also.

@Kiruyuto
Copy link

Kiruyuto commented Nov 20, 2024

Describe alternatives you've considered An alternative has been manually updating project files and generating release notes, which is error-prone and time-consuming. Another option could be using separate tools for versioning and changelog generation, but this lacks the integration and ease of use that a single GitHub Action could offer. I'm current using simple.

You can still automate releases using release-please without the need of using external tools.
Right, there is no thing such as release-type: dotnet, but there is simple workaround for that.
You can use "release-type": "simple" with combination of "extra-files": [...] to update .csproj files and alike

Here's part of the config I am using in our monorepo

I've added comments to explain what does every

"packages": {
    "backend": { // Regular path
      "component": "backend",
      "changelog-path": "CHANGELOG.md",
      "release-type": "simple", // <-- Workaround for dotnet workspaces
      "bump-minor-pre-major": false,
      "bump-patch-for-minor-pre-major": false,
      "component-no-space": true, // Not yet released lmao
      "extra-files": [
        {
          "type": "xml",
          "path": "/backend/ProjectName.API/ProjectName.API.csproj", // "File" path relative from repo root 
          "xpath": "//Project/PropertyGroup/Version" // XML Property path. This is consistent with msbuild properties. See next code block for details
        },
        {
          "type": "xml",
          "path": "/backend/ProjectName.Core/ProjectName.Core.csproj",
          "xpath": "//Project/PropertyGroup/Version"
        },
        {
          "type": "xml",
          "path": "/backend/ProjectName.API.Tests/ProjectName.API.Tests.csproj",
          "xpath": "//Project/PropertyGroup/Version"
        }
      ]
    },
    "web": {
      "component": "web",
      "changelog-path": "CHANGELOG.md",
      "release-type": "node",
      "bump-minor-pre-major": false,
      "bump-patch-for-minor-pre-major": false,
      "component-no-space": true
    }
  },

And my example .csproj, those settings are based on dotnet pack and/or msbuild settings:

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>

		<!-- Theres stuff i'd rather not show -->

        <PackageId>$(AssemblyName)</PackageId>
        <Version>1.8.4</Version> <!-- <= This will be updated according to your semver -->
        <Authors> AUTHORS </Authors>
        <Title> EXAMPLE TITLE </Title>
        <PackageProjectUrl> ACTUAL URL </PackageProjectUrl>
        <RepositoryUrl> ACTUAL URL.git </RepositoryUrl>
        <RepositoryType>git</RepositoryType>
        <RequireLicenseAcceptance>false</RequireLicenseAcceptance>
        <PackageReadmeFile>README.md</PackageReadmeFile>
    </PropertyGroup>

and then you can configure your CI to build, pack & push it all on release to your desired nuget registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants