diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..fafa47c --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index d9cb478..00f631f 100644 --- a/.gitignore +++ b/.gitignore @@ -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