Skip to content

Commit ed18602

Browse files
committed
feat: add GitHub Actions workflow for building and releasing plugin assets
1 parent 1bc2f1a commit ed18602

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build and Release Plugin Assets
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build-and-release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: "1.24"
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: latest
29+
30+
- name: Build backend WASM
31+
working-directory: backend
32+
run: |
33+
set -euo pipefail
34+
mkdir -p ../release/backend
35+
GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ../release/backend/github.wasm .
36+
37+
- name: Build frontend
38+
working-directory: frontend
39+
run: |
40+
set -euo pipefail
41+
bun install --frozen-lockfile
42+
bun run build
43+
44+
- name: Build MCP
45+
working-directory: mcp
46+
run: |
47+
set -euo pipefail
48+
bun install --frozen-lockfile
49+
bun run build
50+
51+
- name: Collect release files
52+
run: |
53+
set -euo pipefail
54+
mkdir -p release/frontend
55+
cp -R frontend/dist release/frontend/dist
56+
57+
mkdir -p release/mcp
58+
cp -R mcp/dist release/mcp/dist
59+
60+
mkdir -p release/migrations
61+
cp -R backend/migrations/. release/migrations/
62+
63+
cp plugin.json release/plugin.json
64+
65+
- name: Create archives
66+
run: |
67+
set -euo pipefail
68+
tar -czf github-backend-wasm.tar.gz -C release/backend github.wasm
69+
tar -czf github-frontend-dist.tar.gz -C release/frontend dist
70+
tar -czf github-mcp-dist.tar.gz -C release/mcp dist
71+
tar -czf github-migrations.tar.gz -C release migrations
72+
tar -czf github-plugin-manifest.tar.gz -C release plugin.json
73+
74+
- name: Generate checksums
75+
run: |
76+
set -euo pipefail
77+
sha256sum github-backend-wasm.tar.gz \
78+
github-frontend-dist.tar.gz \
79+
github-mcp-dist.tar.gz \
80+
github-migrations.tar.gz \
81+
github-plugin-manifest.tar.gz > checksums.txt
82+
83+
- name: Publish GitHub Release assets
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
generate_release_notes: true
87+
files: |
88+
github-backend-wasm.tar.gz
89+
github-frontend-dist.tar.gz
90+
github-mcp-dist.tar.gz
91+
github-migrations.tar.gz
92+
github-plugin-manifest.tar.gz
93+
checksums.txt

0 commit comments

Comments
 (0)