diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3e9ded1..4194a731 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: - name: Pack VSCode Extension working-directory: msbuild-editor-vscode - run: npx vsce package --no-git-tag-version --pre-release ${{ steps.nbgv.outputs.NpmPackageVersion }} + run: npm run vsix-pack - uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') diff --git a/msbuild-editor-vscode/.vscodeignore b/msbuild-editor-vscode/.vscodeignore index 715d6300..4855d33f 100644 --- a/msbuild-editor-vscode/.vscodeignore +++ b/msbuild-editor-vscode/.vscodeignore @@ -15,4 +15,4 @@ src/** # are correct when the README.md is viewed in the repo. however, they # are not needed in the vsix as README.md in the generated package # has the paths rewritten to https URLs to the GitHub repo -/images/** +images/** diff --git a/msbuild-editor-vscode/package.json b/msbuild-editor-vscode/package.json index b4588a8b..6950392d 100644 --- a/msbuild-editor-vscode/package.json +++ b/msbuild-editor-vscode/package.json @@ -8,7 +8,7 @@ "author": { "name": "Mikayla Hutchinson" }, - "icon": "images/icon.png", + "icon": "icon.png", "repository": { "type": "git", "url": "https://github.com/mhutch/MonoDevelop.MSBuildEditor.git" @@ -39,7 +39,9 @@ "lint": "eslint src --ext ts", "test": "vscode-test", "publish-server": "dotnet publish ../MSBuildLanguageServer/MSBuildLanguageServer.csproj --configuration Debug --output ./server", - "copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png" + "copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png", + "vsix-pack": "pwsh -c \"vsce package --baseImagesUrl https://github.com/mhutch/MonoDevelop.MSBuildEditor/raw/HEAD/msbuild-editor-vscode --no-update-package-json --no-git-tag-version --pre-release $(nbgv get-version -v NpmPackageVersion)\"", + "vsix-install": "pwsh -c \"npm run vsix-pack && code --install-extension msbuild-editor-$(nbgv get-version -v NpmPackageVersion).vsix\"" }, "dependencies": { "@vscode/extension-telemetry": "^0.9.0",