Skip to content

add github action

add github action #3

Workflow file for this run

name: main
env:
PACKAGE_NAME: "mcp-server-drupal"
TARGET_LIST: "bun-linux-x64-modern,bun-linux-arm64,bun-windows-x64-modern,bun-darwin-arm64,bun-darwin-x64"
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run biome ci --reporter=github
build:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: |
for target in $(echo $TARGET_LIST | tr "," "\n")
do
binary_name=$(echo $target | sed "s/^bun-/$PACKAGE_NAME-/" | sed "s/-/_/g")
bun build --compile --target=$target --minify --sourcemap --bytecode ./src/index.ts --outfile ./build/$binary_name
done