Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ jobs:
with:
name: theme-vsix
- run: sha256sum --check theme.vsix.sha256
- name: Check Open VSX namespace ownership and credential
- name: Check Open VSX namespace ownership
if: github.event_name == 'release' || inputs.registry != 'marketplace'
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
test -n "$OVSX_PAT" || { echo "::error::Set OVSX_PAT in the publishing environment."; exit 1; }
node --input-type=module -e '
const response = await fetch("https://open-vsx.org/api/linkedinlearning");
if (!response.ok) throw new Error(`Namespace lookup failed: ${response.status}`);
Expand All @@ -70,6 +67,4 @@ jobs:
run: npm exec --no -- vsce publish --packagePath theme.vsix --oidc
- name: Publish the same VSIX to Open VSX
if: github.event_name == 'release' || inputs.registry != 'marketplace'
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npm exec --no -- ovsx publish theme.vsix
run: npm exec --no -- ovsx publish theme.vsix --trusted-publishing
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Credential-free validation and VSIX packaging for pull requests and `main`.
- Approval-gated publishing to Open VSX and the VS Code Marketplace, with passwordless Marketplace authentication.
- Approval-gated publishing to Open VSX and the VS Code Marketplace, with passwordless authentication for both registries.

### Fixed

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Publishing requires:

- Required reviewers configured on the `publishing` environment. Referencing an environment in workflow YAML does not itself enforce approval.
- [Marketplace Trusted Publishing](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publish-with-github-actions-and-trusted-publishing) configured for the repository, workflow `publish.yml`, and environment `publishing`. Authentication uses OIDC rather than a stored Marketplace PAT.
- Verified ownership of the Open VSX namespace and a dedicated publishing token saved as the `OVSX_PAT` environment secret.
- Verified ownership of the Open VSX namespace and [Open VSX Trusted Publishing](https://github.com/eclipse-openvsx/openvsx/blob/master/cli/README.md#trusted-publishing) registered for the extension, repository, workflow `publish.yml`, and environment `publishing`. An extension must already be published and active before its trusted publisher can be registered.

Both registries authenticate with short-lived OIDC credentials; no publishing token secrets are required. The Open VSX command explicitly requires trusted publishing and fails if an OIDC token cannot be obtained.

### Publishing a new version

Expand Down
Loading