Skip to content

refactor cli code (#47) #82

refactor cli code (#47)

refactor cli code (#47) #82

Workflow file for this run

name: ci
on:
push:
branches: [ "master" ]
tags:
- "v*"
pull_request:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: sudo apt-get install -y xvfb
- run: pnpm install
- run: xvfb-run --auto-servernum pnpm test
- name: Publish
if: success() && startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm run vscode:package
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes slidaiv-*.vsix
- name: Publish to Marketplace
if: success() && startsWith(github.ref, 'refs/tags/')
run: pnpm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}