-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Andy James edited this page Jun 26, 2020
·
1 revision
This will take you through installing the dotnet-do tool and running your first task in 3 or 4 commands.
- If you don't have one already, you'll need to install the tool-manifest (usually at the root of your repo). This is necessary for .NET to keep inventory on the installed tools for the given directory hierarchy. If you're looking to install dotnet-do globally, you can skip this step.
dotnet new tool-manifest
- Install the Dotnet Do tool, and make it ready to use! If you're looking to install dotnet-do globally, simply add
--global
to the end of this command.
dotnet tool install dotnet-do
- Let's get a starting point for our first task. Create a sample tasks file (dotnet-tasks.yml).
dotnet do --create
- That was easy! The sample task is named
echo
and simply printsHello World
, let's try executing it.
dotnet do echo
- Let's add another task of our own. Open the "dotnet-tasks.yml" and add a new entry with the task name of
clean-build
, that runsdotnet clean
followed bydotnet build
in the "src" folder.
- name: clean-build
run: |
dotnet clean
dotnet build
working-directory: src/
- We can now run our newly created task.
dotnet do clean-build