cursor-extension test script and logger naming conflict #2
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 | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Version to release (e.g., 1.0.0)" | ||
| required: true | ||
| type: string | ||
| env: | ||
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
| jobs: | ||
| validate: | ||
| name: Validate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Lint | ||
| run: pnpm run lint | ||
| - name: Type check | ||
| run: pnpm run type-check | ||
| - name: Build | ||
| run: pnpm run build | ||
| - name: Test | ||
| run: pnpm run test | ||
| package-vscode-extension: | ||
| name: Package VSCode Extension | ||
| runs-on: ubuntu-latest | ||
| needs: [validate] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Build all packages | ||
| run: pnpm run build | ||
| - name: Package VSCode extension | ||
| run: pnpm run package | ||
| working-directory: packages/vscode-extension | ||
| - name: Upload VSCode extension artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vscode-extension | ||
| path: packages/vscode-extension/*.vsix | ||
| retention-days: 30 | ||
| package-cursor-extension: | ||
| name: Package Cursor Extension | ||
| runs-on: ubuntu-latest | ||
| needs: [validate] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Build all packages | ||
| run: pnpm run build | ||
| - name: Package Cursor extension | ||
| run: pnpm run package | ||
| working-directory: packages/cursor-extension | ||
| - name: Upload Cursor extension artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cursor-extension | ||
| path: packages/cursor-extension/*.vsix | ||
| retention-days: 30 | ||
| create-release: | ||
| name: Create GitHub Release | ||
| runs-on: ubuntu-latest | ||
| needs: [package-vscode-extension, package-cursor-extension] | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Download VSCode extension | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: vscode-extension | ||
| path: ./artifacts/vscode | ||
| - name: Download Cursor extension | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: cursor-extension | ||
| path: ./artifacts/cursor | ||
| - name: Get version from tag | ||
| id: version | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | ||
| echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | ||
| fi | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| name: Release v${{ steps.version.outputs.VERSION }} | ||
| tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', inputs.version) || github.ref_name }} | ||
| draft: false | ||
| prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }} | ||
| generate_release_notes: true | ||
| files: | | ||
| ./artifacts/vscode/*.vsix | ||
| ./artifacts/cursor/*.vsix | ||
| # Optional: Publish to VS Marketplace (requires VSCE_PAT secret) | ||
| publish-vscode-marketplace: | ||
| name: Publish to VS Marketplace | ||
| runs-on: ubuntu-latest | ||
| needs: [create-release] | ||
| if: ${{ !contains(github.ref, '-') && secrets.VSCE_PAT != '' }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Build all packages | ||
| run: pnpm run build | ||
| - name: Publish to VS Marketplace | ||
| run: npx vsce publish --no-dependencies -p ${{ secrets.VSCE_PAT }} | ||
| working-directory: packages/vscode-extension | ||