feat(core,web,vscode): add session sorting and optimize performance #17
Workflow file for this run
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: Release VSCode Extension | |
| on: | |
| push: | |
| tags: | |
| - 'vscode-v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version (e.g., 0.1.5)' | |
| required: true | |
| type: string | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.extension.outputs.version }} | |
| name: ${{ steps.extension.outputs.name }} | |
| filename: ${{ steps.extension.outputs.filename }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install VSCE | |
| run: npm install -g @vscode/vsce | |
| - name: Build packages | |
| run: pnpm run build | |
| - name: Get extension info | |
| id: extension | |
| working-directory: packages/vscode-extension | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| NAME=$(node -p "require('./package.json').name") | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "name=$NAME" >> $GITHUB_OUTPUT | |
| echo "filename=$NAME-$VERSION.vsix" >> $GITHUB_OUTPUT | |
| - name: Generate CHANGELOG.md | |
| working-directory: packages/vscode-extension | |
| run: | | |
| # Get previous vscode tag | |
| PREV_TAG=$(git tag -l 'vscode-v*' --sort=-v:refname | head -2 | tail -1 || echo '') | |
| if [ -n "$PREV_TAG" ]; then | |
| echo "Generating changelog from $PREV_TAG" | |
| npx changelogen --from $PREV_TAG --output CHANGELOG.md | |
| else | |
| echo "No previous tag, generating full changelog" | |
| npx changelogen --output CHANGELOG.md | |
| fi | |
| - name: Package extension | |
| working-directory: packages/vscode-extension | |
| run: | | |
| mkdir -p out | |
| vsce package --no-dependencies -o out/${{ steps.extension.outputs.filename }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vsix-package | |
| path: packages/vscode-extension/out/${{ steps.extension.outputs.filename }} | |
| retention-days: 30 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: vsix-package | |
| path: out | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| # Get previous vscode tag | |
| PREV_TAG=$(git tag -l 'vscode-v*' --sort=-v:refname | head -2 | tail -1 || echo '') | |
| if [ -n "$PREV_TAG" ]; then | |
| echo "Generating changelog from $PREV_TAG" | |
| npx changelogen --from $PREV_TAG --output RELEASE_NOTES.md | |
| else | |
| echo "No previous tag, generating full changelog" | |
| npx changelogen --output RELEASE_NOTES.md | |
| fi | |
| - name: Install VSCE | |
| run: npm install -g @vscode/vsce | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: vscode-v${{ needs.build.outputs.version }} | |
| name: VSCode Extension v${{ needs.build.outputs.version }} | |
| body_path: RELEASE_NOTES.md | |
| files: out/${{ needs.build.outputs.filename }} | |
| draft: false | |
| prerelease: false | |
| - name: Publish to VS Code Marketplace | |
| if: ${{ !github.event.inputs.version || github.event_name == 'push' }} | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: | | |
| if [ -n "$VSCE_PAT" ]; then | |
| vsce publish --packagePath out/${{ needs.build.outputs.filename }} --pat $VSCE_PAT | |
| echo "✅ Published to VS Code Marketplace" | |
| else | |
| echo "⚠️ VSCE_PAT not set, skipping marketplace publish" | |
| fi | |
| - name: Publish to Open VSX Registry | |
| if: ${{ !github.event.inputs.version || github.event_name == 'push' }} | |
| env: | |
| OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
| run: | | |
| if [ -n "$OVSX_PAT" ]; then | |
| npx ovsx publish out/${{ needs.build.outputs.filename }} -p $OVSX_PAT | |
| echo "✅ Published to Open VSX Registry" | |
| else | |
| echo "⚠️ OVSX_PAT not set, skipping Open VSX publish" | |
| fi |