updeep/Taskfile.yaml

48 lines
847 B
YAML
Raw Normal View History

2023-01-03 18:51:35 +00:00
# https://taskfile.dev
version: "3"
vars:
GREETING: Hello, World!
2023-01-11 18:31:55 +00:00
VERSION:
sh: cat package.json | jq -r .version
2023-01-03 18:51:35 +00:00
tasks:
2023-01-11 18:01:28 +00:00
changelog:
sources: [./CHANGELOG.yml]
generates: [./CHANGELOG.md]
cmds:
- changelord print > CHANGELOG.md
2023-01-03 19:31:53 +00:00
test: vitest run
2023-01-11 18:17:50 +00:00
2023-01-03 18:51:35 +00:00
build:
2023-01-11 18:17:50 +00:00
sources: ["src/**"]
generates: ["esm/**"]
2023-01-03 19:31:53 +00:00
deps: [test]
2023-01-03 18:51:35 +00:00
cmds:
2023-01-03 19:31:53 +00:00
- rm -fr esm/
2023-01-03 18:51:35 +00:00
- tsc -p tsconfig.json
2023-01-11 18:17:50 +00:00
prepRelease:
deps: [changelog, build]
preconditions:
- sh: git branch | grep '* main'
msg: not on main
- sh: git is-clean
msg: stuff not commited
cmds:
- npm pack
2023-01-11 18:31:55 +00:00
publish:
deps: [prepRelease]
cmds:
- "git tag v{{.VERSION}}"
- npm publish --access public
- git push
- git push --tags
2023-01-03 18:51:35 +00:00
default:
cmds:
- echo "{{.GREETING}}"
silent: true