Skip to content

Add CI/CD with GitHub Actions #2

@cbini

Description

@cbini

Overview

Set up GitHub Actions for continuous integration and automated publishing to the VS Code Marketplace.

Workflows needed

1. CI — on every push and PR

Trigger: push to main, all pull_request

  • Install dependencies (npm ci)
  • Build (npm run build)
  • Run tests (npm run test)
  • Type-check (tsc --project tsconfig.test.json --noEmit)
  • Lint (trunk check --no-fix)
  • Package VSIX (npx @vscode/vsce package --allow-missing-repository) — verify it produces a valid artifact
  • Upload VSIX as workflow artifact for manual testing

2. Publish — on tagged releases

Trigger: push tags matching v*

  • Run full CI steps above
  • Publish to VS Code Marketplace (npx @vscode/vsce publish)
  • Create GitHub Release with the VSIX attached

Secrets required

Secret Source Purpose
VSCE_PAT Azure DevOps PAT (Marketplace > Manage scope) Authenticate vsce publish

Release process

  1. Bump version: npm version patch (or minor/major)
  2. Push with tag: git push && git push --tags
  3. Actions publishes automatically

Notes

  • Node version should match what's in .trunk/trunk.yaml (node@22.16.0)
  • Tests don't require the VS Code runtime (mocha + ts-node, no @vscode/test-electron)
  • Trunk CLI can be installed via curl https://get.trunk.io -fsSL | bash or the trunk-io/trunk-action GitHub Action
  • Consider adding a manual workflow dispatch for publishing hotfixes without a tag

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions