dotnet-releaser
0.3.9
See the version list below for details.
dotnet tool install --global dotnet-releaser --version 0.3.9
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local dotnet-releaser --version 0.3.9
#tool dotnet:?package=dotnet-releaser&version=0.3.9
nuke :add-package dotnet-releaser --version 0.3.9
dotnet-releaser
<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/xoofx/dotnet-releaser/main/img/dotnet-releaser.png">
dotnet-releaser
is a all-in-one command line tool that fully automates the release cycle of your .NET libraries and applications to NuGet and GitHub by building, testing, running coverage, cross-compiling, packaging, creating release notes from PR/commits and publishing.
In practice, dotnet-releaser
will automate the build and publish process of your .NET libraries and applications by wrapping:
dotnet build
with potentially multiple solutionsdotnet test
- Plus the automatic support for coverage.
dotnet pack
for creating NuGet packagesdotnet publish
that can automatically cross-compile to 9+ CPU/OS platforms.- And create additionally, by default, multiple packages (zip, debian, rpm...) to distribute your app
dotnet nuget push
to publish your package to a NuGet registry- Pretty changelog creation from pull-requests and commits.
- Create and upload the changelog and all the packages packed to your GitHub repository associated with the release tag.
- It will publish automatically the coverage results to https://coveralls.io if your repository is created there.
Features
- Very simple to use, configure and integrate into your GitHub Action CI
- Build and tests your .NET libraries and applications from multiple solutions.
- Add automatic coverage support via coverlet with your tests.
- Cross-compile your .NET 6.0+ application to 9+ OS/CPU targets.
- Create zip archives, Linux packages (debian, rpm) and Homebrew taps
- Allow to publish your application as a service (only
Systemd
for now fordeb
andrpm
packages). - Create and publish beautiful release notes by extracting the information directly from pull-requests and commits, while offering customizable templates.
- Publish all artifacts to NuGet and GitHub
- Can be used to build/tests/package/publish locally or from GitHub Action using the same command.
Defaults
By default, dotnet-releaser
will:
- Build your project(s)/solution(s) in Release
- Run tests in Release
- Create NuGet packages for libraries and applications (packed as a .NET global tool)
- Create application packages for any packable application in your project:
| Platform | Packages |
|-----------------------------------------|------------------|
|
win-x64
,win-arm
,win-arm64
|zip
|linux-x64
,linux-arm
,linux-arm64
|deb
,tar
|rhel-x64
|rpm
,tar
|osx-x64
,osx-arm64
|tar
- Publish libraries and/or applications to NuGet
- Upload all the package artifacts and your changelog to GitHub on the tag associated with your package version (e.g your package is
1.0.0
, it will try to find a git tagv1.0.0
or1.0.0
). - Create a Homebrew repository and formula (e.g
user_or_org/homebrew-your-app-name
) for all the tar files associated with the targets for Linux and MacOS.
Any of these steps can be configured or even entirely disabled easily from a config file. See the user guide on how to setup this differently for your application.
Getting Started
- Install
dotnet-releaser
as a global .NET tool.dotnet tool install --global dotnet-releaser"
- Go to a folder where you have your solution
.sln
file or your project file (.csproj
,.fsproj
,.vbproj
) and run:dotnet releaser new
- It should create a
dotnet-releaser.toml
at the same level than your solution with a content like:[msbuild] project = "Tonlyn.sln" [github] user = "xoofx" repo = "Tomlyn"
- If you want to try a full build locally:
dotnet-releaser build --force dotnet-releaser.toml
- If you want to integrate it to GitHub Action, use the
dotnet-releaser run
command. More details in the doc Adding dotnet-releaser to your CI on GitHub. It is no more complicated than adding the following lines in your GitHub workflow file:
Notice the recommended usage ofsteps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Install .NET 6.0 uses: actions/setup-dotnet@v1 with: dotnet-version: '6.0.x' - name: Build, Tests, Cover, Pack and Publish (on push tag) shell: bash run: | dotnet tool install --global dotnet-releaser dotnet-releaser run --nuget-token "${{secrets.NUGET_TOKEN}}" --github-token "${{secrets.GITHUB_TOKEN}}" src/dotnet-releaser.toml
shell: bash
so that if a secrets token is empty, bash won't remove the quotes, unlike pwsh.
See the user guide below for further details on how to use dotnet-releaser
.
User Guide
For more details on how to use dotnet-releaser
, please visit the user guide.
License
This software is released under the BSD-Clause 2 license.
Who is using dotnet-releaser
?
It's brand new, so it's mainly used by the author for now! 😇
You can visit the .github/workflows
folder, or check the release notes of the following projects to see dotnet-releaser
in action:
Applications:
- grpc-curl: An application shipping multiple executables.
- lunet: An application shipping a .NET global tool to NuGet.
Regular .NET Libraries:
Credits
dotnet-releaser
is a wrapper around many amazing OSS libraries:
- dotnet-packaging by using their NuGet Packaging.Targets to hook package creation into MSBuild user's project.
- CommandLineUtils for handling parsing command line arguments
- Microsoft.Extensions.Logging for logging to the console.
- MsBuildPipeLogger for interacting with MSBuild structured output.
- Octokit.NET for interacting with GitHub.
- Tomlyn for parsing the TOML configuration file.
- CliWrap to easily wrap and launch executables.
- Spectre.Console for generating pretty logs and table reports.
- Scriban used for text templating of the changelog/release notes.
- DotNet.Glob used by changelog filtering on files.
Author
Alexandre Mutel aka xoofx.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
0.10.0 | 285 | 11/13/2024 |
0.9.0 | 3,365 | 5/6/2024 |
0.8.5 | 2,571 | 2/13/2024 |
0.8.4 | 772 | 2/9/2024 |
0.8.3 | 757 | 2/9/2024 |
0.8.2 | 773 | 2/8/2024 |
0.8.1 | 799 | 2/8/2024 |
0.8.0 | 685 | 2/8/2024 |
0.7.1 | 3,476 | 10/14/2023 |
0.7.0 | 1,408 | 10/7/2023 |
0.6.4 | 2,290 | 9/8/2023 |
0.6.3 | 5,556 | 3/8/2023 |
0.6.2 | 1,648 | 3/6/2023 |
0.6.1 | 2,873 | 11/14/2022 |
0.6.0 | 1,489 | 11/14/2022 |
0.5.2 | 1,966 | 10/20/2022 |
0.5.1 | 1,560 | 10/19/2022 |
0.5.0 | 1,780 | 9/5/2022 |
0.4.4 | 1,992 | 8/31/2022 |
0.4.3 | 1,581 | 8/28/2022 |
0.4.2 | 1,822 | 8/11/2022 |
0.4.1 | 2,534 | 5/7/2022 |
0.4.0 | 1,934 | 4/11/2022 |
0.3.14 | 1,985 | 3/7/2022 |
0.3.13 | 1,454 | 3/7/2022 |
0.3.12 | 1,719 | 3/6/2022 |
0.3.11 | 1,439 | 3/6/2022 |
0.3.10 | 1,662 | 3/6/2022 |
0.3.9 | 1,645 | 3/5/2022 |
0.3.8 | 1,566 | 3/5/2022 |
0.3.7 | 1,391 | 3/4/2022 |
0.3.6 | 1,668 | 3/3/2022 |
0.3.5 | 1,596 | 3/3/2022 |
0.3.4 | 1,366 | 3/1/2022 |
0.3.3 | 1,529 | 2/27/2022 |
0.3.2 | 1,644 | 2/27/2022 |
0.3.1 | 1,522 | 2/27/2022 |
0.3.0 | 1,582 | 2/27/2022 |
0.2.2 | 1,443 | 2/25/2022 |
0.2.1 | 1,455 | 2/25/2022 |
0.2.0 | 1,255 | 2/25/2022 |
0.1.12 | 1,537 | 2/8/2022 |
0.1.11 | 1,524 | 2/4/2022 |
0.1.10 | 1,483 | 2/4/2022 |
0.1.9 | 1,464 | 2/3/2022 |
0.1.8 | 1,369 | 2/3/2022 |
0.1.7 | 1,414 | 2/3/2022 |
0.1.6 | 1,627 | 2/2/2022 |
0.1.5 | 1,581 | 1/31/2022 |
0.1.4 | 1,509 | 1/31/2022 |
0.1.3 | 1,519 | 1/31/2022 |
0.1.2 | 1,497 | 1/31/2022 |
0.1.1 | 1,695 | 1/31/2022 |
0.1.0 | 1,681 | 1/29/2022 |