Skip to content

Refactor repo reload, diff generation, and branch update logic #10

Refactor repo reload, diff generation, and branch update logic

Refactor repo reload, diff generation, and branch update logic #10

name: Publish Extension
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Extract version from tag
run: |
TAG=${GITHUB_REF##*/}
VERSION=${TAG#v}
echo "TAG=$TAG" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install dependencies
run: |
npm ci
npm ci --prefix webview-ui
- name: Set package.json version
run: npm version $VERSION --no-git-tag-version
- name: Build and Package
run: |
npm run build:all
npx vsce package
- name: Publish to Visual Studio Marketplace
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
# continue-on-error: true # Optional: Uncomment if you want the GitHub Release to happen even if Marketplace fails
run: npx vsce publish --pat $VSCE_TOKEN --packagePath *.vsix