# https://taskfile.dev version: "3" vars: GREETING: Hello, World! VERSION: sh: cat package.json | jq -r .version tasks: changelog: sources: [./CHANGELOG.yml] generates: [./CHANGELOG.md] cmds: - changelord print > CHANGELOG.md test: vitest run build: sources: ["src/**"] generates: ["esm/**"] deps: [test] cmds: - rm -fr esm/ - tsc -p tsconfig.json 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 publish: deps: [prepRelease] cmds: - "git tag v{{.VERSION}}" - npm publish --access public - git push - git push --tags default: cmds: - echo "{{.GREETING}}" silent: true