-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 1.19 KB
/
Makefile
File metadata and controls
48 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.DEFAULT_GOAL := help
PNPM ?= pnpm
.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: install
install: ## install dependencies from pnpm-lock.yaml
$(PNPM) install --frozen-lockfile
.PHONY: build
build: ## build the bundled GitHub Action into dist/index.js
$(PNPM) run build
.PHONY: lint
lint: ## run ESLint
$(PNPM) run lint
.PHONY: test
test: ## run unit tests
$(PNPM) test
.PHONY: typecheck
typecheck: ## run TypeScript type checks
$(PNPM) run typecheck
.PHONY: package
package: ## build the distributable action package
$(PNPM) run package
.PHONY: validate
validate: ## run typecheck, tests, and build
$(PNPM) run validate
.PHONY: check
check: lint validate ## run all local checks used before release
.PHONY: dist-check
dist-check: build ## verify dist/index.js is up to date after build
@if ! git diff --exit-code -- dist/index.js; then \
echo "::error::dist/index.js is out of date. Run 'make build' and commit the updated bundle."; \
exit 1; \
fi
.PHONY: ci
ci: install check dist-check ## run the release workflow checks locally