Release VS Code extension #10
This file contains 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 VS Code extension | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "apps/scout-extension" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy to VS Code Marketplace | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: apps/scout-extension | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.15.4 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./docs/pnpm-lock.yaml') }} | |
restore-keys: ${{ runner.os }}-pnpm-store- | |
- name: Install dependencies and vsce | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm install -g vsce | |
- name: Build extension | |
run: pnpm esbuild | |
- name: Package and Publish Extension | |
id: publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_TOKEN }} | |
run: | | |
vsce package --no-dependencies | |
vsce publish --no-dependencies |