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

ci: publish pre-release version to VS Code Marketplace #826

Merged
merged 5 commits into from
Jan 19, 2022

Conversation

kpodsiad
Copy link
Member

@kpodsiad kpodsiad commented Jan 17, 2022

From docs:
VS Code Marketplace only support major.minor.patch for extension versions and semver pre-release tags are not supported. Support for this will arrive in the future. Because of this we recommend that extensions use major.EVEN_NUMBER.patch for release versions and major.ODD_NUMBER.patch for pre-release versions. For example: 0.2.* for release and 0.3.* for pre-release. VS Code will auto update extensions to the highest version available, so even if a user opted into a pre-release version and there is an extension release with a higher version, that user will be updated to the released version.

Since semver pre-release tags are not supported some workaround has to be created, docs advise using ODD_NUMBER and EVEN_NUMBER for minors to differentiate between release and pre-release versions. It seems a little bit counterintuitive, hence together with @tgodzik we concluded that this approach will be easier.

Release versions will use major.MINOR.0 and pre-release ones will use major.minor.PATCH.

The pre-release job was added which:

  • needs: [release] because it should run sequentially (in case there is the release, we want to publish pre-release anyway with proper version - bumped both minor and patch)
  • has always() - Causes the step to always execute - even when release was skipped
  • doesn't publish pre-release for trivial actions such as bumping dependencies

@kpodsiad kpodsiad requested a review from tgodzik January 17, 2022 08:43
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some minor comments.

.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
Copy link
Member

@gabro gabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea!

.github/workflows/pre-release.yml Outdated Show resolved Hide resolved
.github/workflows/pre-release.yml Show resolved Hide resolved
@kpodsiad kpodsiad requested a review from tgodzik January 18, 2022 13:38
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for driving this!

@kpodsiad kpodsiad merged commit b8f6c03 into scalameta:main Jan 19, 2022
@kpodsiad kpodsiad deleted the publish-pre-release-versions branch January 19, 2022 12:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants