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
| # Inspired by https://github.com/HaaLeo/vscode-timing/blob/master/.github/workflows/cicd.yml | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| vsixPath: ${{ steps.packageExtension.outputs.vsixPath }} | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v3 | |
| - name: Set up Node 20 📦 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - name: Install dependencies 🧰 | |
| run: | | |
| npm ci | |
| npm install -g @vscode/vsce | |
| - name: Package the extension 🔧 | |
| id: packageExtension | |
| uses: HaaLeo/publish-vscode-extension@v1 | |
| with: | |
| pat: stub | |
| dryRun: true | |
| - name: Upload Extension Package as Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{ steps.packageExtension.outputs.vsixPath }} | |
| name: ${{ steps.packageExtension.outputs.vsixPath }} | |
| if-no-files-found: error | |
| publish-release-vsix: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| if: ${{ github.event_name == 'release' }} | |
| steps: | |
| - name: Download VSIX package 📥 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build.outputs.vsixPath }} | |
| - name: Attach the VSIX to the release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ${{ needs.build.outputs.vsixPath }} | |
| # The VSCODE_MARKETPLACE_ACCESS_TOKEN secret is a PAT scoped to a single | |
| # Azure DevOps organization (nickolaykudasov), Marketplace > Manage scope. | |
| # "All accessible organizations" PATs were deprecated on 2026-12-01; | |
| # single-org PATs continue to work. Optional future improvement: switch | |
| # to Entra ID federated workload identity — see CLAUDE.md. | |
| publish-vscode: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download VSIX package 📥 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build.outputs.vsixPath }} | |
| - name: Publish to Visual Studio Marketplace | |
| uses: HaaLeo/publish-vscode-extension@v1 | |
| with: | |
| pat: ${{ secrets.VSCODE_MARKETPLACE_ACCESS_TOKEN }} | |
| extensionFile: ${{ needs.build.outputs.vsixPath }} | |
| registryUrl: https://marketplace.visualstudio.com | |
| publish-open-vsx: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download VSIX package 📥 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build.outputs.vsixPath }} | |
| - name: Publish to Open VSX Registry | |
| uses: HaaLeo/publish-vscode-extension@v1 | |
| with: | |
| pat: ${{ secrets.OPEN_VSX_ACCESS_TOKEN }} | |
| extensionFile: ${{ needs.build.outputs.vsixPath }} | |
| registryUrl: https://open-vsx.org |