Skip to content

Add publish-vscode-extension action#2

Open
zackverham wants to merge 19 commits into
posit-dev:mainfrom
zackverham:zackverham/publish-vscode-extension
Open

Add publish-vscode-extension action#2
zackverham wants to merge 19 commits into
posit-dev:mainfrom
zackverham:zackverham/publish-vscode-extension

Conversation

@zackverham

@zackverham zackverham commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new composite GitHub Action (publish-vscode-extension) that publishes pre-built .vsix files to the VS Marketplace or Open VSX Registry
  • Supports configurable registry URL, skip-duplicate, and dry-run modes
  • Includes a test workflow and sample extension fixture for CI validation

zackverham and others added 6 commits May 18, 2026 12:56
… bugs

- Validate mutual exclusivity of extensionFile and packagePath inputs
- Add file existence check when extensionFile is provided
- Run vsce package from the extension directory (cd into packagePath)
- Use consistent multi-target handling (for loop) in vsce publish
- Improve PAT redaction to avoid bash pattern-matching edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The check for mutual exclusivity of extensionFile and packagePath only
compared against "./", missing the case where a user sets packagePath
to "." (without trailing slash). Add "." to the default-value comparison
so both forms are recognized as the default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove packaging logic from the action — callers are responsible for
building the .vsix beforehand. This reduces complexity and the number of
inputs to maintain. Update tests to pre-package the fixture extension
and target Node 24.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The skipDuplicate input was only applied to vsce publish (VS Marketplace)
but silently ignored when publishing to Open VSX registries. Since ovsx
supports --skip-duplicate, pass it in both code paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zackverham zackverham marked this pull request as draft May 18, 2026 20:28
zackverham and others added 12 commits June 3, 2026 14:25
…erage

Use VSCE_PAT/OVSX_PAT environment variables instead of passing the token
as a CLI argument, avoiding process-list exposure. Add set -euo pipefail
to all shell steps, extract a resolve step for testability, and add tests
for registry URL routing and trailing-slash normalization. Pin Node to 20 LTS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…versioning docs

- Add workflow file path to trigger paths so CI runs on workflow changes
- Remove unnecessary Node setup from the missing-file test job
- Replace global npm install with npx for vsce/ovsx to avoid conflicts
  on self-hosted runners
- Add CHANGELOG.md and expand versioning section in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Newer versions of vsce require activationEvents when a main entry point
is specified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Premature for the current stage of the action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ovsx CLI reads its PAT from the OVSX_TOKEN environment variable,
not OVSX_PAT. Also replace redundant vsce package steps in resolution
test jobs with dummy files since they only verify tool selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Unpinned npx calls fetch the latest version on every run, which means
a breaking change in either package could silently break the action for
all consumers. Pin to @vscode/vsce@2 and ovsx@0 to prevent surprise
breakage while still getting patch/minor updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node 24 is not an LTS release. Documentation examples should recommend
LTS versions for reliability; Node 22 is the current active LTS line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node 24 is not an LTS release (won't be until October 2026). Using the
active LTS version (Node 22) avoids transient failures from pre-stability
bugs and better reflects what most users of this action will run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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