Skip to content

Performance: Optimize extension activation event #7

Performance: Optimize extension activation event

Performance: Optimize extension activation event #7

Workflow file for this run

name: Publish Extension
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build extension
run: npm run build
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Verify package.json
run: |
echo "Extension details:"
node -e "const pkg = require('./package.json'); console.log('Name:', pkg.name); console.log('Version:', pkg.version); console.log('Publisher:', pkg.publisher);"
- name: Package extension
run: vsce package
- name: Publish to VSCode Marketplace
run: vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
env:
VSCODE_MARKETPLACE_TOKEN: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: '*.vsix'
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload VSIX as artifact
uses: actions/upload-artifact@v4
with:
name: extension-vsix
path: '*.vsix'