Skip to content

Commit

Permalink
Use extension dependencies (#59)
Browse files Browse the repository at this point in the history
* Change extensionPack to extensionDependencies, to fix uninstall issues

Breaks usage from OpenVSX, as the dependencies aren't available there

* Build separate .vsix files for OpenVSX
  • Loading branch information
will-v-pi authored Aug 30, 2024
1 parent 90d96f4 commit ca85baf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ jobs:
run: |
yarn lint
vsce package
- name: Modify package.json for OVSX
# ms-vscode extensions not available on OpenVSX registry, so remove dependencies
run: |
sed -i 's/"ms-vscode.*",//g' package.json
- name: Package Extension for OVSX
run: |
vsce package -o ovsx-raspberry-pi-pico.vsix
- name: Test PAT
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
env:
Expand All @@ -43,12 +50,16 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: raspberry-pi-pico
path: raspberry-pi-pico-*.vsix
path: |
raspberry-pi-pico-*.vsix
ovsx-raspberry-pi-pico.vsix
- name: Add Release Asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: raspberry-pi-pico-*.vsix
files: |
raspberry-pi-pico-*.vsix
ovsx-raspberry-pi-pico.vsix
- name: Publish Extension
if: startsWith(github.ref, 'refs/tags/')
env:
Expand All @@ -58,4 +69,4 @@ jobs:
- name: Publish Extension to OVSX
if: startsWith(github.ref, 'refs/tags/')
run: |
npx ovsx publish raspberry-pi-pico-*.vsix -p ${{ secrets.OPEN_VSX_PAT }}
npx ovsx publish ovsx-raspberry-pi-pico.vsix -p ${{ secrets.OPEN_VSX_PAT }}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"Snippets",
"Other"
],
"extensionPack": [
"marus25.cortex-debug",
"extensionDependencies": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.vscode-serial-monitor"
"ms-vscode.vscode-serial-monitor",
"marus25.cortex-debug"
],
"main": "./dist/extension.cjs",
"markdown": "github",
Expand Down

0 comments on commit ca85baf

Please sign in to comment.