Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 35 additions & 37 deletions .github/workflows/release-lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: Release LSP
on:
push:
tags:
- 'iii-lsp/v*'
- 'iii-lsp-vscode/v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g., iii-lsp/v1.0.0)'
description: 'Tag to release (e.g., iii-lsp-vscode/v1.0.0)'
required: true
type: string

permissions:
contents: write

concurrency:
group: release-iii-lsp-${{ github.ref }}
group: release-vscode-${{ github.ref }}
cancel-in-progress: false

jobs:
Expand All @@ -39,7 +39,7 @@ jobs:
env:
TAG: ${{ steps.resolve.outputs.tag }}
run: |
VERSION="${TAG#iii-lsp/v}"
VERSION="${TAG#iii-lsp-vscode/v}"

if [[ "$VERSION" =~ -dry-run\.[0-9]+$ ]]; then
echo "dry_run=true" >> "$GITHUB_OUTPUT"
Expand All @@ -53,49 +53,47 @@ jobs:
fi

echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "::notice::iii-lsp release -- tag=$TAG version=$VERSION"
echo "::notice::iii-lsp-vscode release -- tag=$TAG version=$VERSION"

create-release:
name: Create GitHub Release
publish:
name: Package & Publish
needs: [setup]
if: needs.setup.outputs.dry_run != 'true'
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: iii-lsp-vscode
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
token: ${{ steps.generate_token.outputs.token }}
node-version: 20

- name: Install dependencies
run: npm ci

- name: Package VSIX
run: npx @vscode/vsce package --out iii-lsp-${{ needs.setup.outputs.version }}.vsix

- name: Create GitHub Release
- name: Publish to VS Code Marketplace
if: needs.setup.outputs.dry_run != 'true'
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npx @vscode/vsce publish --pat "$VSCE_PAT"
Comment on lines +78 to +82
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

vsce publish --packagePath option to publish existing vsix

💡 Result:

To publish an already-built .vsix (instead of repackaging from the current folder), use vsce publish --packagePath:

# publish an existing VSIX
vsce publish --packagePath ./myext-1.2.3.vsix -p "$VSCE_PAT"
  • --packagePath (alias -i) tells vsce publish to upload existing .vsix file(s) (you can pass multiple paths). [1]
  • This is commonly used after creating a platform-specific VSIX with vsce package --target ..., then publishing that VSIX via --packagePath. [2]

Notes

  • You still need Marketplace credentials (PAT via -p/VSCE_PAT, or Entra ID if you’re set up for that). [1]

Sources: [1] [2]


Use the pre-built VSIX for VS Code Marketplace publishing.

Line 82 runs vsce publish without --packagePath, causing it to re-package the extension from source instead of using the VSIX built in line 76. This creates an inconsistency where VS Code Marketplace receives a different package than OpenVSX (line 88) and the GitHub Release.

🔧 Proposed fix to use the pre-built VSIX
       - name: Publish to VS Code Marketplace
         if: needs.setup.outputs.dry_run != 'true'
         env:
           VSCE_PAT: ${{ secrets.VSCE_PAT }}
-        run: npx `@vscode/vsce` publish --pat "$VSCE_PAT"
+        run: npx `@vscode/vsce` publish --packagePath iii-lsp-${{ needs.setup.outputs.version }}.vsix --pat "$VSCE_PAT"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-lsp.yml around lines 78 - 82, The "Publish to VS
Code Marketplace" step currently runs npx `@vscode/vsce` publish which repackages
source instead of using the pre-built VSIX; update that step to pass
--packagePath (pointing to the VSIX artifact produced earlier, i.e., the file
created in the build step on line 76) to npx `@vscode/vsce` publish so the
Marketplace upload uses the same pre-built VSIX as OpenVSX and the GitHub
Release, and keep the existing VSCE_PAT env usage.


- name: Publish to OpenVSX
if: needs.setup.outputs.dry_run != 'true'
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx ovsx publish iii-lsp-${{ needs.setup.outputs.version }}.vsix --pat "$OVSX_PAT"

- name: Upload VSIX to GitHub Release
if: needs.setup.outputs.dry_run != 'true'
uses: softprops/action-gh-release@v2
with:
token: ${{ steps.generate_token.outputs.token }}
tag_name: ${{ needs.setup.outputs.tag }}
name: iii-lsp ${{ needs.setup.outputs.version }}
name: iii-lsp-vscode ${{ needs.setup.outputs.version }}
draft: false
prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }}
generate_release_notes: true

binary-build:
name: Binary Release
needs: [setup, create-release]
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/_rust-binary.yml
with:
bin_name: iii-lsp
manifest_path: iii-lsp/Cargo.toml
tag_name: ${{ needs.setup.outputs.tag }}
is_prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }}
skip_create_release: true
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
secrets:
GH_APP_ID: ${{ secrets.GH_APP_ID }}
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
files: iii-lsp-vscode/iii-lsp-${{ needs.setup.outputs.version }}.vsix
99 changes: 0 additions & 99 deletions .github/workflows/release-vscode.yml

This file was deleted.

Loading