Fix: Add GitHub Actions workflow for automated publishing

This commit is contained in:
B Harper
2025-10-26 18:22:02 +11:00
parent 464f4e0bf4
commit d5878d9f32
2 changed files with 45 additions and 2 deletions
+43
View File
@@ -0,0 +1,43 @@
name: Publish VS Code Extension
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Update version from release tag
run: |
VERSION=${GITHUB_REF#refs/tags/v}
npm version $VERSION --no-git-tag-version
- name: Package extension
run: npm run vscode:prepublish
- name: Publish to marketplace
run: npx @vscode/vsce publish --pat ${{ secrets.VSCE_PAT }}
- name: Upload VSIX as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./humanagent-mcp-${{ github.event.release.tag_name }}.vsix
asset_name: humanagent-mcp-${{ github.event.release.tag_name }}.vsix
asset_content_type: application/zip
+2 -2
View File
@@ -8,8 +8,8 @@ node_modules
# VS Code workspace settings
.vscode/
# GitHub workflow and personal files
.github/
# GitHub personal files (but allow workflows)
.github/copilot-instructions.md
# Environment files
.env