feat:再优化时间戳 #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build VSIX Package | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/build_vsix.yml' | |
| - 'VSIX/**' | |
| - 'VSIX/**.vsix' | |
| - '!VSIX/**.md' | |
| - '!VSIX/LICENSE' | |
| - '!VSIX/.vscodeignore' | |
| branches: | |
| - '*' | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to publish (e.g., 1.0.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: VSIX | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org/' | |
| - name: Update version (manual trigger) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: npm version ${{ github.event.inputs.version }} --no-git-tag-version | |
| - name: Get package version | |
| run: | | |
| echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npx -y @vscode/vsce package | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: vsix | |
| files: VSIX/snow-cli-${{ env.PACKAGE_VERSION }}.vsix | |
| name: Release VSCode extension | |
| body: | | |
| ## 🚀 Snow CLI VSCode extension | |
| Latest release version: `v${{ env.PACKAGE_VERSION }}` | |
| ### Requirements | |
| Install Snow CLI globally: | |
| ```bash | |
| npm install -g snow-ai | |
| ``` | |
| ### Usage | |
| 1. Open any file in VSCode | |
| 2. Click the **Snow icon** button in the editor toolbar (top right) | |
| 3. A terminal opens with Snow CLI running | |
| 4. The extension automatically connects via WebSocket | |
| draft: false | |
| prerelease: false |