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

Add pre-release support #16

Closed
gnikit opened this issue Dec 8, 2021 · 13 comments
Closed

Add pre-release support #16

gnikit opened this issue Dec 8, 2021 · 13 comments
Labels
enhancement New feature or request

Comments

@gnikit
Copy link
Contributor

gnikit commented Dec 8, 2021

Description
VS Code in release 1.63.0 added support for pre-releases and in the future they will be adding semver style tags.
https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_63.md#publishing-pre-release-extensions

It would be a good idea IMO to allow for additional arguments to be passed into vsce, e.g. --pre-release. Of course care needs to be taken with how/when a pre-release build will be triggered. For example, the not so elegant solution that I thought of, is to have a separate .yml with --pre-release set as an argument that runs at every push on master and another .yml that triggers only on a GitHub release.

The important thing is to not allow for a normal release and a pre-release to publish under the exact same version number. There are some tricks that one can employ to ensure that but I would consider this responsibility lying with the developer of the VS Code extension and not this GitHub Action.

@HaaLeo HaaLeo added the enhancement New feature or request label Dec 9, 2021
@HaaLeo
Copy link
Owner

HaaLeo commented Dec 9, 2021

Hi @gnikit I agree that the action should support pre-releases. IMHO it should be sufficient to expose the corresponding flag of vsce. Then it is up to the action users how they are using this flag.

@gnikit
Copy link
Contributor Author

gnikit commented Dec 9, 2021

Yes, that sounds great!

@HaaLeo
Copy link
Owner

HaaLeo commented Dec 17, 2021

Another remark ist, that it seems that vsce only considers this option during the packaging step.

@gnikit
Copy link
Contributor Author

gnikit commented Dec 17, 2021

it seems that vsce only considers this option during the packaging step.

Oh did I mess up and include it only in publish?
Tbh I had a look at the vsce API and with my limited knowledge of typescript it was not clear to me how does one set the --pre-release flag from their API.
As in there is a preRelease option for publish but it is not present in the API.

@HaaLeo
Copy link
Owner

HaaLeo commented Dec 17, 2021

No worries, I will browser their code and double check before releasing it.

@HaaLeo
Copy link
Owner

HaaLeo commented Dec 17, 2021

Released with v1.0.0

@HaaLeo HaaLeo closed this as completed Dec 17, 2021
@cvergne
Copy link

cvergne commented Jan 31, 2022

Hi, sorry to "re-open" the issue.
Since the 1.0 release, the release v2.6.3 en VSCE has fixed the missing preRelease in API, so maybe we can revert the files to handle the param on publish ? :)
Thanks (and thanks for this Github Action, really really useful !)

@HaaLeo
Copy link
Owner

HaaLeo commented Feb 7, 2022

Hi @cvergne the release you are referring to adds this option only to the api definitions this release does not change any functional behaviour of vsce.

If you package and publish your extension (dryRun: false) with this GitHub action the preRelease option is considered as one expects.
However if you first package your extension with dryRun: true, preRelease: false and then in a second step publish the packaged extension with (extensionFile: 'path/To/extension.vsix', preRelease: true) the extension will not be published as pre-release. This is what I mean with

it seems that vsce only considers this option during the packaging step.

I hope this clarifies the behaviour of the preRelease flag.

fendor added a commit to fendor/vscode-haskell that referenced this issue Apr 3, 2022
According to HaaLeo/publish-vscode-extension#16 (comment)
this is necessary to make sure the pre-release steps work correctly.
@fendor
Copy link

fendor commented Apr 3, 2022

Hello! It looks like VSX marketplace has added this feature: eclipse/openvsx#410
We should be able to have pre-releases for VSX now, too :)

@HaaLeo
Copy link
Owner

HaaLeo commented Apr 11, 2022

Hi @fendor thx for bringing this up. The action's pre-release support should already support pre-releases for both marketplaces.

@kingdonb
Copy link

kingdonb commented Aug 8, 2022

I've been using this workflow to publish to the VS Code marketplace, regular releases and pre-releases, pretty much followed the guide: https://www.stateful.com/blog/the-github-action-you-need-to-publish-vscode-extensions

and I have just enabled publishing to the Open-VSX after I figured out what was missing (the Publisher agreement)

I noticed that the pre-release setting is not honored, so all of my pre-release builds are always promoted over the stable releases, and there is no way to choose between them except by selecting a specific version.

Then I went searching through the market in VS Codium for any prerelease builds at all, on any extension, and I noticed that also I did not find any other extension with a pre-release. Has this ever worked, or did the VSX market change something?

I understand the bit about not supporting semver properly that is more than a little strange decision on the MS extension store.

Edit:
Screen Shot 2022-08-08 at 9 35 43 AM

for reference, the relevant step that publishes these to OpenVSX as pre-release, with the flag enabled:

Screen Shot 2022-08-08 at 9 44 25 AM

I'd love to hear that both markets are moving in the direction of supporting semver including the prerelease format of semver, as this method of marking builds with a timestamp so their semver number is always higher than non-prerelease builds in the same minor series is... definitely a kludge! But I have not been in any of the planning meetings so I have no idea what's up with this capability. Do you know if it is really supported?

@gnikit
Copy link
Contributor Author

gnikit commented Aug 10, 2022

@kingdonb at the time I implemented this vsce had just added Pre-Release support on the VS Code Insiders build and ovsx had no support for Pre-release.
Since the original contribution,, ovsx has added the --pre-release flag when publishing.

It's been on my TODO-list to open another PR to implement this, but I've haven't gotten around to it yet.

@kingdonb
Copy link

kingdonb commented Aug 10, 2022

It looks like it wouldn't have made any difference yet, as vscodium does not appear to treat pre-releases different than regular releases. I tried various manual methods of publishing a (pre-)release and they all went to the main channel.

Confirmed (I think) on this issue thread: eclipse/openvsx#410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants