# Bake Bake is a convention based build tool that focuses on minimal to none effort to configure and setup. Ideally you should be able to run `bake` in any repository with minimal arguments and get the "expected" output or better. This however comes at the cost of conventions and how well Bake works on a project all depends on how many of the conventions that project follows. Bake is the right tool for you if you - ... don't want to have a complicated build setup and configuration - ... just want to focus on the development part of your project - ... want to have the "basics" covered during build and release - ... just want a build, test and release process that works Bake is **NOT** the right tool for you if you - ... like having control of every part of the build and release process - ... have a project with a lot of custom build and/or release steps ## Features - **Artifacts** are automatically created for relevant projects. Examples are NuGet packages, Windows/Linux single binaries for tools, containers for `Dockerfile` - **Release notes** are parsed and added to all applicable artifacts - **Tests** are automatically located and executed ## Installing Bake There is a few different ways to install Bake, choose one that best suites your needs. * **Download binary** - Simply download a binary from the [releases](https://github.com/rasmus/Bake/releases) page that suites your platform and architecture * **Install .NET tool** - If have the .NET SDK installed, you can install Bake as a .NET tool. ``` dotnet tool install --global Bake --version [VERSION] ``` **NOTE:** Be sure to always install a specific version to ensure that your builds does not suddenly change behavior when new features are introduced in new versions of Bake. ## Usage Here are some examples of typical arguments passed to Bake. ### Basic test build Here is the simple use case for using Bake on e.g. pull requests ``` bake run ``` ### Basic release build Here is the simple example of running a release build that sends NuGet packages created during the release to the GitHub package store for the owner of the current repository. ``` bake run --convention=Release --destination="nuget>github,container>rasmus" ```
$ dotnet add package BakeBake is a convention based build tool that focuses on minimal to none effort
to configure and setup. Ideally you should be able to run bake in any
repository with minimal arguments and get the "expected" output or better. This
however comes at the cost of conventions and how well Bake works on a project
all depends on how many of the conventions that project follows.
Bake is the right tool for you if you
Bake is NOT the right tool for you if you
DockerfileThere is a few different ways to install Bake, choose one that best suites your needs.
dotnet tool install --global Bake --version [VERSION]
NOTE: Be sure to always install a specific version to ensure that your
builds does not suddenly change behavior when new features are introduced
in new versions of Bake.Here are some examples of typical arguments passed to Bake.
Here is the simple use case for using Bake on e.g. pull requests
bake run
Here is the simple example of running a release build that sends NuGet packages created during the release to the GitHub package store for the owner of the current repository.
bake run --convention=Release --destination="nuget>github,container>rasmus"
When Bake analyzes a repository, it first gathers gathers basic information regarding the environment its executed within.
RELEASE_NOTES.md file, the content as well as the version information
is used to further enrich any release artifactsAfter the initial environment information gathering is completed, Bake starts to scan the repository for files and structures it knows how to process.
Dockerfile will get
the file builtapp.py file, will be bundled
into a containerpackage.json file will get bundled into a
container with the script in the main property used as entrypointBased on the selected convention (by providing e.g. --convention=Release)
and the destinations for artifacts, Bake pushes/uploads/creates the built
artifacts to their configured destinations.
Here are some examples of common used arguments to Bake
--destination=
container>{username}, e.g. simply container>rasmus - Will mark the
destination as Docker Hub with that usernamecontainer>github - Send containers to the GitHub package repository
for at owner/organization of the git repositorycontainer>registry.local:5000 - Send containers to a specific container
registryhelm-chart>octopus@http://octopus.local/ - Sends Helm charts to the built-in
repository in Octopus Deploy. Bake looks for the API-key
in an environment variable named OCTOPUS_DEPLOY_APIKEYhelm-chart>chart-museum@http://chart-museum.local/ - Sends Helm charts to an
instance of ChartMuseumnuget - An unnamed destination will send NuGet packages to the central
NuGet repository at nuget.org. Bake will look for
an API in an environment variable named NUGET_APIKEYnuget>github - Send NuGet packages to the specific need with is owned
by the owner of the repository of the current repository. Bake will
automatically setup the API key for the current build using the
GITHUB_TOKEN (automatically provided in GitHub actions), thus no
additional configuration is requirednuget>http://nuget.local/v3/index.json - Send NuGet packages to the feed
specified by the URL. Bake will look for the API key in an environment
variable named bake_credentials_nuget_{hostname}_apikey, in which
{hostname} is the hostname of the URL with invalid characters removedrelease>github - Creates release on GitHub within the current GitHub
repository with the release notes and any important artifacts neatly
bundled together in ZIP files with any README.md, LICENSE and
RELEASE_NOTES.md in ZIP files found in the root of the repositoryMIT License
Copyright (c) 2021-2025 Rasmus Mikkelsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.