HaaLeo / publish-vscode-extension

GitHub action to publish your VS Code Extension to the Open VSX Registry or Visual Studio Marketplace.
MIT License
209 stars 13 forks source link

Feat/target option #47

Closed alexravenna closed 1 year ago

alexravenna commented 1 year ago

Summary

The option target, denoting the target architectures the extension can be used on, was added to the Action, since both vsce and osvx now support it.

Changes

Related Issues

Implements #37

alexravenna commented 1 year ago

Hey @HaaLeo, thanks for this extension! I'm already using it to publish my theme and am happy to help make VS Code extensions available on more platforms!

I looked at the sources from osvx and implemented this according to how I understood those, since it seems like osvx handles target differently from vsce...but I'm not 100% certain if I got it all right 😅. Is there any way to test the extension in this "development" state? Or should I just test it on the command line with the --target parameter?

HaaLeo commented 1 year ago

Hi @alexravenna, thx for your contribution. It is somewhat tricky to test this GH action. But you can reference your repo/branch instead of HaaLeo/publish-vscode-extension@v1. I've done that before with a hello-world VS Code extension.

I'll hope to be able to review your PR throughout this week. But I cannot promise 😅

drok commented 9 months ago

This doesn't quite work. With the following snippet (note the dry-run), the generated visx does not include TargetPlatform="linux-x64" as expected

     - name: Package Extension
       id: packageExtension
       uses: HaaLeo/publish-vscode-extension@v1
       with:
         pat: stub
         preRelease: true
         dryRun: true
         yarn: true
         target: ${{ matrix.config.name }}

A quick look at the commits in this PR shows that the --target option is applied to the publishing step, which makes some sense.

However, since the action also supports dryRun (pack only), that mode should not generate a defective visx.