mirror of
https://github.com/tailscale/github-action.git
synced 2026-08-20 10:49:23 +00:00
The tailscale repo does not get tagged for unstable builds, so the best we can do when building macOS from source is to build from the HEAD of `main`. Updates tailscale/corp#32813 Signed-off-by: Percy Wegmann <percy@tailscale.com>
42 lines
757 B
Makefile
42 lines
757 B
Makefile
# Makefile for building a TypeScript GitHub Action
|
|
|
|
# Variables
|
|
SHELL := /bin/bash
|
|
SRC_DIR := src
|
|
BUILD_DIR := dist
|
|
ENTRY_POINT := $(SRC_DIR)/index.ts
|
|
|
|
# Binaries
|
|
TS_NODE := ./node_modules/.bin/ts-node
|
|
TS_C := ./node_modules/.bin/tsc
|
|
ESLINT := ./node_modules/.bin/eslint
|
|
PRETTIER := ./node_modules/.bin/prettier
|
|
|
|
# Targets
|
|
.PHONY: all clean install build format
|
|
|
|
all: clean install build
|
|
|
|
# Clean up the lib directory
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
# Install npm dependencies
|
|
install:
|
|
npm install
|
|
|
|
# Build the TypeScript code
|
|
build: clean format
|
|
npm run build
|
|
|
|
# Lint the TypeScript code
|
|
lint:
|
|
$(ESLINT) $(SRC_DIR)
|
|
|
|
# Format the TypeScript code
|
|
format:
|
|
$(PRETTIER) --write "$(SRC_DIR)/**/*.ts"
|
|
|
|
# Run the action locally (for testing purposes)
|
|
run: build
|
|
|