-
Notifications
You must be signed in to change notification settings - Fork 22
88 lines (72 loc) · 2.57 KB
/
release-opencode-plugin.yml
File metadata and controls
88 lines (72 loc) · 2.57 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release OpenCode Plugin
on:
push:
branches: [main]
paths:
- "cupcake-plugins/opencode/**"
- ".github/workflows/release-opencode-plugin.yml"
workflow_dispatch:
jobs:
build-and-release:
name: Build and Release Plugin
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: cupcake-plugins/opencode
run: bun install
- name: Type check
working-directory: cupcake-plugins/opencode
run: bun run typecheck
- name: Build plugin
working-directory: cupcake-plugins/opencode
run: bun run build
- name: Prepare release assets
working-directory: cupcake-plugins/opencode/dist
run: |
# Rename files to match expected release asset names
cp cupcake.js opencode-plugin.js
sha256sum opencode-plugin.js > opencode-plugin.js.sha256
echo "Release assets:"
ls -la opencode-plugin.*
echo "Checksum:"
cat opencode-plugin.js.sha256
- name: Get commit info
id: commit
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "date=$(date -u +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Update plugin release
uses: softprops/action-gh-release@v2
with:
tag_name: opencode-plugin-latest
name: OpenCode Plugin (Latest)
body: |
Latest build of the Cupcake OpenCode plugin.
This release is automatically updated when changes are merged to main.
**Build:** ${{ steps.commit.outputs.sha_short }} (${{ steps.commit.outputs.date }})
## Files
- `opencode-plugin.js` - The plugin file
- `opencode-plugin.js.sha256` - SHA256 checksum
## Installation
The plugin is automatically downloaded when you run:
```bash
cupcake init --harness opencode
```
Or manually download:
```bash
curl -fsSL https://github.com/eqtylab/cupcake/releases/download/opencode-plugin-latest/opencode-plugin.js \
-o .opencode/plugin/cupcake.js
```
files: |
cupcake-plugins/opencode/dist/opencode-plugin.js
cupcake-plugins/opencode/dist/opencode-plugin.js.sha256
make_latest: false
prerelease: false