Taskfile
and not Make
?Taskfile
Taskfile
(Refer to the Official documentation)
brew install go-task/tap/go-task # Maintained by the developers
# OR
brew install go-task # Official hombrew repository
sudo snap install task --classic
npm install -g @go-task/cli
- name: arduino/setup-task
uses: arduino/setup-task@v1.0.3
Task will look for the following file names, in order of priority:
version: '3'
tasks:
build:
cmds:
- go build -v -i main.go
assets:
cmds:
- esbuild --bundle --minify css/index.css > public/bundle.css
version: '3'
tasks:
up:
dir: '{{.USER_WORKING_DIR}}'
preconditions:
- test -f docker-compose.yml
cmds:
- docker-compose up -d
Taskfiles
version: '3'
includes:
docs: ./documentation # will look for ./documentation/Taskfile.yml
docker: ./DockerTasks.yml
version: '3'
tasks:
build:
desc: Build the project
cmds:
- npm install
- npm run build
precondition:
- sh: command -v npm
- msg: "npm not found, please install it"
test:
desc: Run tests
cmds:
- task build
- npm test
precondition:
- sh: command -v npm
- msg: "npm not found, please install it"
deploy:
desc: Deploy the project
cmds:
- task test
- npm run deploy
deps:
- build
- test
precondition:
- sh: command -v npm
- msg: "npm not found, please install it"