Skip to content

Commit af5a28c

Browse files
committed
add github action
1 parent 03dafd9 commit af5a28c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: main
2+
3+
env:
4+
PACKAGE_NAME: "mcp-server-drupal"
5+
TARGET_LIST: "bun-linux-x64-modern,bun-linux-arm64,windows-x64-modern,bun-darwin-arm64,bun-darwin-x64"
6+
7+
on:
8+
push:
9+
pull_request:
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: oven-sh/setup-bun@v2
17+
18+
- run: bun install
19+
- run: bun run biome ci --reporter=github
20+
21+
build:
22+
runs-on: ubuntu-latest
23+
needs: lint
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: oven-sh/setup-bun@v2
27+
28+
- run: bun install
29+
- run: |
30+
for target in $(echo $TARGET_LIST | tr "," "\n")
31+
do
32+
binary_name=$(echo $target | sed "s/^bun-/$PACKAGE_NAME-/" | sed "s/-/_/g")
33+
bun build --compile --target=$target --minify --sourcemap --bytecode ./src/index.ts --outfile ./build/$binary_name
34+
done

0 commit comments

Comments
 (0)