Skip to content

Merge pull request #16 from menloresearch/justrach/new-design #7

Merge pull request #16 from menloresearch/justrach/new-design

Merge pull request #16 from menloresearch/justrach/new-design #7

Workflow file for this run

name: Release Extension Zips
on:
push:
tags:
- "*" # run on any tag push
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies (Bun)
run: bun install --frozen-lockfile
- name: Install MCP search server deps (Bun)
run: bun install --cwd mcp/search-server --no-save
- name: Build extension and MCP server (Bun)
run: bun run build:all
- name: Build Firefox extension (Bun)
run: bun run build:firefox
- name: Prepare extension package (Chrome)
id: pkg
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
PKG_NAME="jan-extension-chrome-${TAG}.zip"
mkdir -p pack/extension
# Copy required extension files
cp -r manifest.json dist icons src pack/extension/
# Optional docs
[ -f LICENSE ] && cp LICENSE pack/extension/ || true
[ -f README.md ] && cp README.md pack/extension/ || true
# Create zip with correct root layout
(cd pack/extension && zip -r "../../${PKG_NAME}" .)
echo "pkg_name=${PKG_NAME}" >> "$GITHUB_OUTPUT"
- name: Prepare extension package (Firefox)
id: pkg_ff
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
PKG_FF_NAME="jan-extension-firefox-${TAG}.zip"
(cd dist-firefox && zip -r "../${PKG_FF_NAME}" .)
echo "pkg_ff_name=${PKG_FF_NAME}" >> "$GITHUB_OUTPUT"
- name: Package MCP search server (optional asset)
id: mcp
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
MCP_DIR="mcp/search-server/dist"
if [ -d "$MCP_DIR" ]; then
MCP_ZIP="search-mcp-server-${TAG}-dist.zip"
zip -r "$MCP_ZIP" "$MCP_DIR"
echo "mcp_zip=${MCP_ZIP}" >> "$GITHUB_OUTPUT"
else
echo "mcp_zip=" >> "$GITHUB_OUTPUT"
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: builds-${{ github.ref_name }}
if-no-files-found: warn
path: |
${{ steps.pkg.outputs.pkg_name }}
${{ steps.pkg_ff.outputs.pkg_ff_name }}
${{ steps.mcp.outputs.mcp_zip }}
- name: Create GitHub Release and upload assets
if: ${{ env.ACT != 'true' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Jan Extension ${{ github.ref_name }}
draft: false
prerelease: false
body: |
Firefox support: Added official Firefox build artifact alongside Chrome.
- Artifacts: `jan-extension-chrome-${{ github.ref_name }}.zip`, `jan-extension-firefox-${{ github.ref_name }}.zip`.
- Notes: Firefox package is built from `manifest.firefox.json` and zipped from `dist-firefox`.
- MCP Server (optional): included as `search-mcp-server-${{ github.ref_name }}-dist.zip` when present.
files: |
${{ steps.pkg.outputs.pkg_name }}
${{ steps.pkg_ff.outputs.pkg_ff_name }}
${{ steps.mcp.outputs.mcp_zip }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}