Skip to content

Add vsce as a dev dependency #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
Expand Down Expand Up @@ -52,10 +53,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: npm install
node-version: 16.x
- run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_config_arch }}
- shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
Expand All @@ -71,6 +71,10 @@ jobs:
if: success() && startsWith( github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: npm ci
- run: npx vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ vsc-extension-quickstart.md
**/.eslintrc.json
.github
node_modules
!node_modules/vscode-ripgrep
!node_modules/@vscode/ripgrep
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![CI](https://github.com/microsoft/vscode-platform-specific-sample/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/vscode-platform-specific-sample/actions/workflows/ci.yml)
[![CI](https://badgen.net/vs-marketplace/v/joaomoreno.vscode-platform-specific-sample)](https://marketplace.visualstudio.com/items?itemName=joaomoreno.vscode-platform-specific-sample)

This is an example platform-specific VS Code extension. It exposes a single command `Get Ripgrep version`, which pops up a notification containing the version of the bundled [ripgrep](https://github.com/BurntSushi/ripgrep) executable. It bundles the ripgrep executable by depending on [vscode-ripgrep](https://github.com/microsoft/vscode-ripgrep), which contains the platform-specific ripgrep executable.
This is an example platform-specific VS Code extension. It exposes a single command `Get Ripgrep version`, which pops up a notification containing the version of the bundled [ripgrep](https://github.com/BurntSushi/ripgrep) executable. It bundles the ripgrep executable by depending on [@vscode/ripgrep](https://github.com/microsoft/vscode-ripgrep), which contains the platform-specific ripgrep executable.

The [CI script](https://github.com/microsoft/vscode-platform-specific-sample/actions/workflows/ci.yml) makes sure VSIXs for all supported VS Code targets are built in an automated fashion. [Once built](https://github.com/microsoft/vscode-platform-specific-sample/actions/runs/1059200691), each VSIX should be available as a build artifact. Furthermore, if a tag (eg `v1.0.0`) is pushed to the repo, an additional build stage will collect all built VSIX files and publish them accordingly to the VS Marketplace using the new `--target` [vsce](https://github.com/microsoft/vscode-vsce) flag.

Expand Down
2 changes: 1 addition & 1 deletion extension.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const vscode = require('vscode');
const { rgPath } = require('vscode-ripgrep');
const { rgPath } = require('@vscode/ripgrep');
const cp = require('child_process');
const { promisify } = require('util');
const execFile = promisify(cp.execFile);
Expand Down
Loading