Skip to content

Commit a09725c

Browse files
committed
ci(workflows): use shared reusable workflows from .github repo
Update build and publish workflows to use the new vsc-vsix-build and vsc-vsix-publish reusable workflows.
1 parent 15ca49d commit a09725c

2 files changed

Lines changed: 9 additions & 125 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,6 @@ on:
1616

1717
jobs:
1818
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout code
22-
uses: actions/checkout@v4
23-
24-
- name: Setup Node.js
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: '20'
28-
cache: 'npm'
29-
30-
- name: Install dependencies
31-
run: npm ci
32-
33-
- name: Run linting
34-
run: npm run lint
35-
36-
- name: Run tests
37-
run: npm run test
38-
39-
- name: Build extension
40-
run: npm run build
41-
42-
- name: Package VSIX
43-
run: npx @vscode/vsce package -o CodingWithCalvin.VSC-MCPServer.vsix
44-
45-
- name: Upload VSIX artifact
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: vsix
49-
path: CodingWithCalvin.VSC-MCPServer.vsix
19+
uses: CodingWithCalvin/.github/.github/workflows/vsc-vsix-build.yml@main
20+
with:
21+
extension-name: VSC-MCPServer

.github/workflows/publish.yml

Lines changed: 6 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -3,101 +3,13 @@ name: Publish to VS Code Marketplace
33
on:
44
workflow_dispatch:
55

6-
permissions:
7-
contents: write
8-
actions: read
9-
106
jobs:
117
publish:
12-
runs-on: ubuntu-latest
13-
outputs:
14-
version: ${{ steps.version.outputs.version }}
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
token: ${{ secrets.GITHUB_TOKEN }}
21-
22-
- name: Setup Node.js
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: '20'
26-
cache: 'npm'
27-
28-
- name: Install dependencies
29-
run: npm ci
30-
31-
- name: Run tests
32-
run: npm run test
33-
34-
- name: Build extension
35-
run: npm run build
36-
37-
- name: Set version
38-
id: version
39-
run: |
40-
VERSION=$(date +'%Y.%m%d').${{ github.run_number }}
41-
npm version $VERSION --no-git-tag-version --allow-same-version
42-
echo "version=$VERSION" >> $GITHUB_OUTPUT
43-
44-
- name: Package VSIX
45-
run: npx @vscode/vsce package -o CodingWithCalvin.VSC-MCPServer.vsix
46-
47-
- name: Publish to VS Code Marketplace
48-
run: npx @vscode/vsce publish -p ${{ secrets.VS_PAT }}
49-
50-
- name: Upload VSIX artifact
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: vsix
54-
path: CodingWithCalvin.VSC-MCPServer.vsix
55-
56-
changelog:
57-
needs: publish
58-
uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main
59-
secrets: inherit
60-
61-
release:
62-
needs: [publish, changelog]
63-
runs-on: ubuntu-latest
64-
permissions:
65-
contents: write
66-
steps:
67-
- name: Download VSIX artifact
68-
uses: actions/download-artifact@v4
69-
with:
70-
name: vsix
71-
72-
- name: Create GitHub Release
73-
uses: softprops/action-gh-release@v1
74-
with:
75-
tag_name: v${{ needs.publish.outputs.version }}
76-
name: v${{ needs.publish.outputs.version }}
77-
body: ${{ needs.changelog.outputs.changelog }}
78-
files: CodingWithCalvin.VSC-MCPServer.vsix
79-
80-
bluesky:
81-
needs: [publish, release]
82-
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
83-
with:
84-
post_text: |
85-
🚀 VSC as MCP v${{ needs.publish.outputs.version }} has been released!
86-
87-
[GitHub Release](https://github.com/CodingWithCalvin/VSC-MCPServer/releases/tag/v${{ needs.publish.outputs.version }})
88-
[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VSC-MCPServer)
89-
embed_title: "VSC as MCP v${{ needs.publish.outputs.version }}"
90-
embed_description: "Supercharge your AI coding assistants with VS Code's powerful language intelligence!"
91-
secrets: inherit
92-
93-
x:
94-
needs: [publish, release]
95-
uses: CodingWithCalvin/.github/.github/workflows/x-post.yml@main
8+
uses: CodingWithCalvin/.github/.github/workflows/vsc-vsix-publish.yml@main
969
with:
97-
post_text: |
98-
🚀 VSC as MCP v${{ needs.publish.outputs.version }} has been released!
99-
100-
GitHub Release: https://github.com/CodingWithCalvin/VSC-MCPServer/releases/tag/v${{ needs.publish.outputs.version }}
101-
VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VSC-MCPServer
10+
extension-name: VSC-MCPServer
11+
display-name: "VSC as MCP"
12+
marketplace-id: CodingWithCalvin.VSC-MCPServer
13+
description: "Supercharge your AI coding assistants with VS Code's powerful language intelligence!"
14+
hashtags: "#mcp #ai #claude"
10215
secrets: inherit
103-

0 commit comments

Comments
 (0)