-
Notifications
You must be signed in to change notification settings - Fork 44
59 lines (50 loc) · 1.84 KB
/
package-and-upload-assets.yml
File metadata and controls
59 lines (50 loc) · 1.84 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
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
working-directory: ./mcp-server
run: npm ci
# 4. Runs your build script
- name: Run build
working-directory: ./mcp-server
run: 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 -czvf ../jules-release.tar.gz --exclude='.git' --exclude='.github' --exclude='assets' . && mv ../jules-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 }} \
jules-release.tar.gz