Publish to VS Code MarketPlace & update Sentry #2
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: Publish to VS Code MarketPlace | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version number to update in package.json" | |
required: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install dependencies | |
run: | | |
npm ci | |
npm install -g vsce | |
- name: Update version in package.json | |
run: | | |
version="${{ github.event.inputs.version }}" | |
jq --arg version "$version" '.version = $version' package.json > package.tmp.json | |
mv package.tmp.json package.json | |
shell: bash | |
- name: Verify updated package.json | |
run: cat package.json | |
- name: Package VS Code Extension | |
run: vsce package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vsce-package | |
path: "*.vsix" | |
# - name: Publish to VS Code Marketplace | |
# env: | |
# VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
# run: vsce publish -p $VSCE_PAT |