mirror of
https://github.com/wassname/HumanAgent-MCP.git
synced 2026-09-09 11:14:27 +08:00
Fix: Add GitHub Actions workflow for automated publishing
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user