Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/package-and-upload-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Package and Upload Release Assets

on:
release:
types: [created]

# This allows you to run the workflow manually from the Actions tab
workflow_dispatch:
inputs:
tag_name:
description: 'The tag of the release to upload assets to'
required: true
type: string

permissions:
# This permission is required for the action to create a GitHub Release
contents: write

jobs:
build-and-package:
runs-on: ubuntu-latest
steps:
# 1. Checks out your repository's code
- name: Checkout code
uses: actions/checkout@v4

# 2. Sets up the Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Specify the Node.js version you use
cache: 'npm'
# Tell the cache where to find the package-lock.json
cache-dependency-path: mcp-server/package-lock.json

# 3. Install MCP server dependencies
# The MCP server needs its dependencies bundled in the release
- name: Install MCP server dependencies
run: cd mcp-server && npm ci

# 4. Runs your build script
- name: Run build
run: cd mcp-server && npm run build

# 5. Create TAR archive with MCP server dependencies
# Exclude root node_modules but INCLUDE mcp-server/node_modules
- name: Create TAR archive
run: tar -cvzf ../security-release.tar.gz --exclude='.git' --exclude='.github' --exclude='./assets' . && mv ../security-release.tar.gz .

# 6. Upload the TAR archive as a release asset
- name: Upload archive to GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload \
${{ github.event.release.tag_name || inputs.tag_name }} \
security-release.tar.gz
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"mcpServers": {
"securityServer": {
"command": "node",
"args": ["${extensionPath}/mcp-server/security.ts"]
"args": ["${extensionPath}/mcp-server/dist/security.js"]
}
}
}
15 changes: 15 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"packages": {
".": {
"extra-files": [
{
"type": "json",
"path": "gemini-extension.json",
"jsonpath": "$.version"
}
]
}
}
}
Loading