Skip to content

feat: release pipeline, palette PNGs, screenshot script, publishing guide - #18

Merged
crypticpy merged 2 commits into
mainfrom
feat/release-pipeline
Aug 18, 2026
Merged

feat: release pipeline, palette PNGs, screenshot script, publishing guide#18
crypticpy merged 2 commits into
mainfrom
feat/release-pipeline

Conversation

@crypticpy

@crypticpy crypticpy commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Final PR of the 2026-08-18 audit remediation plan (docs/plans/2026-08-18-audit-remediation.md, PR 7 of 7).

  • .github/workflows/release.yml — on v* tag (or manual dispatch): version-vs-tag check, npm run check && npm test, vsce package, upload VSIX artifact, create GitHub Release, then publish to the VS Code Marketplace (VSCE_PAT) and Open VSX (OVSX_PAT) — each publish step is skipped when its secret is absent, so the workflow is safe to run before the publisher exists.
  • CI — actions bumped to v7 (checkout / setup-node / upload-artifact; supersedes Dependabot chore(deps): Bump actions/upload-artifact from 4 to 7 #11chore(deps): Bump actions/checkout from 4 to 7 #13) and a new step: node scripts/render-palette.mjs --check — committed palette PNGs must match the palette.
  • scripts/render-palette.mjs — dependency-free PNG renderer (bitmap font, zlib + CRC32) producing images/palette-<variant>.png: syntax ladder with L*, bracket pairs, ANSI 0–15 on the variant's background. npm run render:palette; npm run check now includes the --check.
  • tests/render-palette.test.mjs — valid RGBA PNG per theme; deterministic; committed PNGs current (28 tests total).
  • scripts/capture-screenshots.sh — macOS: packages the VSIX, installs it into a throwaway profile at /tmp/alone-shot, launches each variant with the recommended settings and captures images/screenshot-<slug>.png. Needs Screen Recording permission for the terminal, so it is run by hand, not in CI.
  • docs/PUBLISHING.md — creating the crypticpy publisher, Azure DevOps PAT scope, Open VSX namespace + token, the two repo secrets, first-publish smoke test, screenshots slot swap, badges, troubleshooting.
  • README: palette PNGs embedded (hero slot reserved for the screenshot); .vscodeignore excludes images/palette-*.png and images/screenshot-*.png from the VSIX (13 files packaged). CONTRIBUTING gains a Releasing section; CHANGELOG 2.0.0 entry.

Verification

  • npm run check (build + verify + palette --check) and node --test tests/*.test.mjs → 28 pass, locally on this branch rebased on 890b7df.
  • actionlint clean on both workflows.
  • vsce ls → 13 files, no images.

Publishing itself is left to the maintainer per docs/PUBLISHING.md (publisher, PAT, secrets, v2.0.0 tag).

🤖 Generated with Claude Code

Summary by Sourcery

Establish the extension’s release and publishing pipeline while adding synchronized visual palette assets and supporting documentation.

New Features:

  • Add a tag-driven release workflow that validates versions, tests and packages the extension, creates GitHub Releases, and optionally publishes to the VS Code Marketplace and Open VSX.
  • Add generated palette PNGs for each theme and embed them in the README.
  • Add a macOS utility for capturing reproducible screenshots of each theme variant.

Enhancements:

  • Extend the project checks to detect stale palette images and update contributor guidance for palette changes and releases.
  • Upgrade GitHub Actions dependencies and document publisher setup, credentials, release steps, screenshots, and troubleshooting.

Build:

  • Add palette rendering and freshness-check npm scripts and exclude repository showcase images from VSIX packages.

CI:

  • Run palette image freshness validation in CI and update checkout, Node setup, and artifact upload actions.

Deployment:

  • Automate VSIX release and optional publishing to the VS Code Marketplace and Open VSX.

Documentation:

  • Embed theme palette previews in the README and add publishing and release documentation.
  • Record the 2.0.0 release changes in the changelog.

Tests:

  • Add tests covering palette PNG validity, deterministic rendering, and synchronization with committed images.

…uide

- .github/workflows/release.yml: v* tag → version check → check+test →
  vsce package → GitHub Release → vsce publish (VSCE_PAT) → ovsx publish
  (OVSX_PAT); publish steps skip without secrets; workflow_dispatch dry run.
- CI actions bumped to checkout/setup-node/upload-artifact v7 (supersedes
  Dependabot #11–13); palette-PNG freshness checked in CI and npm run check.
- scripts/render-palette.mjs: dependency-free PNG palette strips per variant
  (images/palette-*.png) shown in README; tests/render-palette.test.mjs.
- scripts/capture-screenshots.sh: reproducible macOS editor screenshots.
- docs/PUBLISHING.md: publisher/PAT/Open VSX/secrets/first publish/badges.
- README images excluded from the VSIX (served from the repo by vsce).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @crypticpy, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a full tag-driven release pipeline (GitHub Actions + marketplace/Open VSX publishing), introduces a dependency-free PNG palette renderer with tests and CI enforcement, wires palette imagery and screenshot capture into documentation, and updates contributor/release guidance and packaging metadata.

Sequence diagram for the new tag-driven release workflow

sequenceDiagram
  actor Developer
  participant GitHub as GitHub
  participant ReleaseWorkflow as release.yml
  participant VSCodeMarketplace as VSCode_Marketplace
  participant OpenVSX as Open_VSX

  Developer->>GitHub: git tag vX.Y.Z && git push origin vX.Y.Z
  GitHub-->>ReleaseWorkflow: Trigger on push tags v*

  ReleaseWorkflow->>ReleaseWorkflow: Tag must match package.json version

  ReleaseWorkflow->>ReleaseWorkflow: npm run check
  ReleaseWorkflow->>ReleaseWorkflow: npm test

  ReleaseWorkflow->>ReleaseWorkflow: npx vsce package
  ReleaseWorkflow->>GitHub: upload-artifact (VSIX)
  ReleaseWorkflow->>GitHub: gh release create (attach VSIX)

  alt VSCE_PAT present and publish enabled
    ReleaseWorkflow->>VSCodeMarketplace: vsce publish --packagePath VSIX
  end

  alt OVSX_PAT present and publish enabled
    ReleaseWorkflow->>OpenVSX: ovsx publish VSIX --pat OVSX_PAT
  end
Loading

Flow diagram for palette PNG generation and CI enforcement

flowchart TD
  A[Palette change in themes/_src] --> B[npm run check]
  B --> C[build:themes]
  C --> D[verify]
  D --> E[node scripts/render-palette.mjs --check]

  A --> F[npm run render:palette]
  F --> G[Write images/palette-*.png]

  subgraph CI
    H[npm run check] --> I[node scripts/render-palette.mjs --check]
    I -->|stale PNGs| J[Fail workflow]
  end

  subgraph Tests
    K[tests/render-palette.test.mjs]
    K --> L[Validate PNGs per theme]
  end
Loading

File-Level Changes

Change Details Files
Add a tag-driven release workflow that builds, tests, packages a VSIX, creates a GitHub Release, and conditionally publishes to the VS Code Marketplace and Open VSX.
  • Define a Release workflow triggered by v* tags and workflow_dispatch with a publish toggle.
  • Run npm ci, enforce tag/version match, and gate release on npm run check plus npm test.
  • Package a versioned VSIX, upload it as an artifact, and create a GitHub Release attaching the VSIX.
  • Publish the VSIX via vsce and ovsx only when corresponding secrets are present and publishing is enabled.
.github/workflows/release.yml
Tighten CI and incorporate palette freshness checking into the main pipeline.
  • Upgrade checkout, setup-node, and upload-artifact actions to v7.
  • Run the existing build, verify, and test steps on Node 22 and 24 as before.
  • Add a palette PNG freshness step that runs the new renderer in --check mode.
  • Continue to package and upload a VSIX artifact from the Node 24 job.
.github/workflows/ci.yml
Introduce a dependency-free palette PNG renderer and integrate it into scripts, tests, and contributor workflow.
  • Add scripts/render-palette.mjs implementing a hand-rolled PNG writer with bitmap font and theme-role integration, rendering per-variant palette strips.
  • Expose npm scripts for render:palette and extend check to include render-palette --check.
  • Add node:test coverage that validates PNG structure, determinism, and that committed palette-*.png files are current.
  • Document palette PNG requirements and regeneration steps in CONTRIBUTING and CHANGELOG entries.
scripts/render-palette.mjs
package.json
tests/render-palette.test.mjs
CONTRIBUTING.md
CHANGELOG.md
Add a macOS-only screenshot capture script and wire screenshot usage into README and publishing docs.
  • Create a capture-screenshots.sh script that builds a VSIX, installs it into a throwaway VS Code profile, opens the sample file with preset settings per variant, and captures window screenshots.
  • Handle variant selection, window bounds via osascript, and cleanup of temporary profile directories.
  • Update README to reserve a hero screenshot slot and embed per-variant palette PNGs as images.
  • Document screenshot capture workflow, permissions, and README wiring in PUBLISHING.md.
scripts/capture-screenshots.sh
README.md
docs/PUBLISHING.md
Clarify contributor release and palette image processes and ensure release documentation points to the new automation.
  • Update CONTRIBUTING to describe palette PNG checks, how to regenerate them along with themes and README tables, and add a Releasing section that references docs/PUBLISHING.md and the tag-driven flow.
  • Add a 2.0.0 CHANGELOG section describing the release pipeline, palette images, screenshot tooling, and publishing guide.
  • Keep .vscodeignore unchanged while relying on prior config to exclude README images from the VSIX package as described in docs.
CONTRIBUTING.md
CHANGELOG.md
.vscodeignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c35b58cf3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml Outdated
if: env.HAS_VSCE_PAT == 'true' && env.DO_PUBLISH == 'true'
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npx vsce publish --packagePath "${{ steps.pkg.outputs.vsix }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make registry publishing independently retryable

If Marketplace publishing succeeds but the subsequent Open VSX step fails (for example, because of a transient outage or token problem), rerunning this job executes vsce publish again before reaching Open VSX. The Marketplace rejects an already-published version—as docs/PUBLISHING.md:122 itself documents—so the rerun cannot repair the partial release. Put the two registry publications in independently retryable jobs or skip versions that are already present.

Useful? React with 👍 / 👎.

…tent GitHub Release

Addresses Codex review on PR #18: a combined job re-ran `vsce publish` before
reaching Open VSX, and the Marketplace rejects an already-published version,
so a partial release could not be repaired. Publishing is now two jobs that
consume the VSIX artifact from `build`; "Re-run failed jobs" retries only the
one that failed. `gh release create` falls back to `upload --clobber` when the
release already exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@crypticpy
crypticpy merged commit 621fa3b into main Aug 18, 2026
3 checks passed
@crypticpy
crypticpy deleted the feat/release-pipeline branch August 18, 2026 07:52
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