Skip to content

[GitHub Actions CI/CD] Add automated workflows for PR checks and releases - #3

Merged
erdemtuna merged 18 commits into
mainfrom
feature/github-actions-cicd
Feb 26, 2026
Merged

[GitHub Actions CI/CD] Add automated workflows for PR checks and releases#3
erdemtuna merged 18 commits into
mainfrom
feature/github-actions-cicd

Conversation

@erdemtuna

Copy link
Copy Markdown
Owner

Summary

Adds comprehensive GitHub Actions CI/CD automation with three workflows and supporting token linting infrastructure.

Changes

Workflows

  • PR Checks (.github/workflows/pr-checks.yml): Runs on PRs to main with lint, compile, test, and agent token linting
  • Extension Release (.github/workflows/release.yml): Tag-triggered (v*) workflow for VS Code Marketplace publishing
  • CLI Publish (.github/workflows/publish-cli.yml): Tag-triggered (cli-v*) workflow for npm publishing

Token Linting Infrastructure

  • scripts/lint-prompting.sh: Bash wrapper for token counting
  • scripts/count-tokens.js: Tiktoken-based counter using gpt-4o-mini model
  • New npm scripts: lint:agent, lint:agent:skills, lint:agent:all

Documentation

  • Updated README.md with release process documentation
  • Added Development section with workflow details

Testing

  • ✅ Lint passes (npm run lint)
  • ✅ TypeScript compiles (npm run compile)
  • ✅ Token linting works (npm run lint:agent:all)
  • ✅ Workflow files are syntactically valid (YAML parsed successfully)

Breaking Changes

None

Required Setup

Before workflows can run successfully:

  1. For extension releases: Add VSCE_PAT secret (VS Code Marketplace token)
  2. For CLI publishing: Add NPM_TOKEN secret (npm auth token with publish access)

Artifacts

Planning artifacts available at commit e7bd0c0:
https://github.com/erdemtuna/markdown-commenter/tree/e7bd0c0/.paw/work/github-actions-cicd/

🐾 Generated with PAW

erdemtuna and others added 18 commits February 26, 2026 15:41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents PAW workflow patterns and markdown-commenter structure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5 phases: token linting, PR checks, extension release, CLI publish, docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Note CLI tests step is placeholder (no test files exist)
- Document npm OIDC prerequisites for publishConfig

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add scripts/lint-prompting.sh for agent/skill token validation
- Add scripts/count-tokens.js using tiktoken for token counting
- Add @dqbd/tiktoken devDependency
- Add lint:agent, lint:agent:all, lint:skills npm scripts

Thresholds: agents 5K warn/7K error, skills 8K warn/12K error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Automated quality gates on pull requests:
- TypeScript linting
- Extension compilation
- VS Code extension tests (with xvfb)
- CLI tests (placeholder until tests added)
- Agent/skill token linting

Triggers on PRs to main with path filtering for relevant files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tag-triggered (v*) release workflow:
- Extracts version from git tag (source of truth)
- Detects pre-release via odd/even minor version
- Packages VSIX with correct filename
- Creates GitHub Release with VSIX attached
- Publishes to VS Code Marketplace (with graceful fallback)

Requires VSCE_PAT secret for Marketplace publishing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tag-triggered (cli-v*) npm publish workflow:
- Extracts version from git tag
- Detects pre-release via semver suffix (-alpha, -beta, -rc)
- Builds and tests CLI package
- Publishes to npm with appropriate tag (latest/beta)
- Creates GitHub Release with installation instructions

Includes detailed documentation for npm OIDC setup prerequisites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create Docs.md with comprehensive technical reference
- Update README Development section with linting and release process

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clarify NPM_TOKEN authentication in CLI publish workflow
- Add id to Marketplace publish step for status check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents VSCE_PAT and NPM_TOKEN secrets required for releases,
plus first-time CLI publish instructions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create CONTRIBUTING.md with dev setup, PR workflow, release process
- Add maintainer guide section with secrets, first-time publish, token limits
- Simplify README to point to CONTRIBUTING.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- truncate.ts: Handle maxLength < 3 by returning truncated ellipsis
- platformDetection.test.ts: Include 'wsl' in valid platforms list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Node --test fails when glob matches nothing. Check for files first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 256x256 PNG icon at images/icon.png
- Remove placeholder SVG
- Add icon field to package.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@erdemtuna
erdemtuna merged commit 7cd4c7e into main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant