forked from cereon-labs/cereon-browser-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.47 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (43 loc) · 1.47 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
name: Release
# Triggered by pushing a version tag, e.g. `git tag v2.1.0 && git push --tags`.
# Builds the extension, attaches a load-unpacked-ready zip to a GitHub Release,
# and (only if an NPM_TOKEN secret is configured) publishes the MCP server.
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build extension
run: pnpm run build
- name: Verify build output
run: node scripts/verify-dist.mjs
- name: Package unpacked extension
run: cd dist && zip -r "../browser-operator-${{ github.ref_name }}.zip" . && cd ..
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: browser-operator-${{ github.ref_name }}.zip
- name: Publish MCP server to npm
if: ${{ env.NPM_TOKEN != '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm --filter cereon-browser-operator-mcp publish --no-git-checks --access public