Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set target if VSIX already exists, and file name isn't set correctly. #58

Open
ajbt200128 opened this issue Sep 5, 2024 · 0 comments

Comments

@ajbt200128
Copy link

publish-vscode-extension Version Operating System
1.6.2 linux-x64, linux-arm64, darwin-x64, darwin-arm64

Description

If we try and publish to multiple places, with a set target:

- name: Publish to Open VSX Registry
  uses: HaaLeo/publish-vscode-extension@v1
  id: publishToOpenVSX
  with:
    pat: ${{ secrets.OPEN_VSX_TOKEN }}
    target: ${{matrix.os}}
- name: Publish to Visual Studio Marketplace
  uses: HaaLeo/publish-vscode-extension@v1
  with:
    pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
    registryUrl: https://marketplace.visualstudio.com
    target: ${{matrix.os}}
    extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

we get

Error: Both options not supported simultaneously: 'packagePath' and 'target'. Use 'vsce package --target <target>' to first create a platform specific package, then use 'vsce publish --packagePath <path>' to publish it.

on the second action. If we remove the extensionFile field, it still produces this error.

If we remove the target field, it turns out the vsixPath output of the first action will extensionname-X.X.X.vsix, even though target is set. This means the second action will upload it as universal.

Expected Behavior

We should either be able to set target on both actions, or when the action produces a vsix with a specific target, it should name it according to how vsce package names it, so it gets uploaded correctly in the second action, i.e. extensionname-platform-X.X.X.vsix

Actual Behavior

See description

Steps to Reproduce

  1. Create an action as mentioned in description
  2. run it
  3. try removing the target or extension file field from the 2nd invocation of the action

Context



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

No branches or pull requests

1 participant