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
16 changes: 11 additions & 5 deletions .github/workflows/vscode-extension-secure-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
description: "Target registries (comma-separated: vscode-marketplace,open-vsx)"
required: false
type: string
default: "vscode-marketplace"
default: "vscode-marketplace,open-vsx"

# Security: Minimal permissions following principle of least privilege
permissions:
Expand Down Expand Up @@ -241,12 +241,11 @@ jobs:
name: Publish to Open VSX Registry
runs-on: ubuntu-latest
needs: [pre-publish-security] # provenance]
# Note: we are not ready to publish it to OpenVSX Registry
if: contains(github.event.inputs.target_registries, 'open-vsx')
if: github.event_name == 'release' || contains(github.event.inputs.target_registries, 'open-vsx')

environment:
name: open-vsx
url: https://open-vsx.org/extension/AmadeusITGroup/prompt-registry
url: https://open-vsx.org/extension/AmadeusITGroup/${{ env.EXTENSION_NAME }}

permissions:
contents: read
Expand All @@ -265,8 +264,15 @@ jobs:

- name: Verify package integrity
run: |
# Verify checksums
sha256sum -c checksums.txt

# Additional integrity checks
if [ ! -f "${{env.EXTENSION_NAME}}-${{ needs.pre-publish-security.outputs.version }}.vsix" ]; then
echo "Package file not found!"
exit 1
fi

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -285,7 +291,7 @@ jobs:
exit 1
fi

# Publish to Open VSX
# Publish with explicit package path
ovsx publish ${{env.EXTENSION_NAME}}-${{ needs.pre-publish-security.outputs.version }}.vsix -p $OVSX_PAT

# Create installation bundles
Expand Down
6 changes: 5 additions & 1 deletion docs/contributor-guide/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ These scripts update `package.json` and version references in `README.md`.
- Add release notes
- Publish release

**⚠️ Important:** Publishing the release triggers the CI workflow to publish to VS Code Marketplace
**Important:** Publishing the release triggers the CI workflow to publish to VS Code Marketplace and Open VSX Registry.

Required publishing secrets:
- `VSCODE_MARKETPLACE_TOKEN` for VS Code Marketplace
- `OPEN_VSX_TOKEN` for Open VSX Registry

## Pre-release Testing

Expand Down
Loading