Skip to content

Commit 24bce4c

Browse files
committed
Add step to publish to open-vsx
Signed-off-by: hhpatel14 <[email protected]>
1 parent 22d05d0 commit 24bce4c

File tree

3 files changed

+475
-2
lines changed

3 files changed

+475
-2
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,39 @@ jobs:
8383
with:
8484
node-version-file: ".nvmrc"
8585

86+
- name: Install dependencies
87+
run: npm ci
88+
working-directory: ./vscode
89+
8690
- name: Publish to VS Code Marketplace
91+
working-directory: ./vscode
8792
if: ${{ inputs.prerelease == false }}
8893
run: |
8994
echo "Publishing ${{ steps.vsix_info.outputs.vsix_path }}"
95+
npx --no-install @vscode/vsce --version
9096
if [ -f "./artifacts/release.md" ]; then
9197
echo "Publishing with changelog"
92-
npx @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}" --changelog-path "./artifacts/release.md"
98+
npx --no-install @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}" --changelog-path "./artifacts/release.md"
9399
else
94100
echo "Publishing without changelog (file not found)"
95-
npx @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}"
101+
npx --no-install @vscode/vsce publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}"
96102
fi
97103
env:
98104
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
99105

106+
- name: Publish to Open-vsx registery
107+
working-directory: ./vscode
108+
if: ${{ inputs.prerelease == false }}
109+
run: |
110+
echo "Publishing ${{ steps.vsix_info.outputs.vsix_path }}"
111+
if [ -f "./artifacts/release.md" ]; then
112+
echo "Publishing with changelog"
113+
npx --no-install ovsx publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}" --changelog-path "./artifacts/release.md" --pat ${{ secrets.OVSX_MARKETPLACE_TOKEN }}
114+
else
115+
echo "Publishing to Open-vsx registery"
116+
npx --no-install ovsx publish --packagePath "${{ steps.vsix_info.outputs.vsix_path }}" --pat ${{ secrets.OVSX_MARKETPLACE_TOKEN }}
117+
fi
118+
100119
- name: Create Release
101120
uses: ncipollo/release-action@v1
102121
with:

0 commit comments

Comments
 (0)