-
Notifications
You must be signed in to change notification settings - Fork 34
Automatically publish extension and add pre-release version #624
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
base: main
Are you sure you want to change the base?
Conversation
name: extension-pr-${{ github.event.pull_request.number }} | ||
path: ${{ steps.setup.outputs.packageName }} | ||
if-no-files-found: error | ||
retention-days: 7 | ||
|
||
- name: Upload artifact (main) | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: extension-main-${{ github.sha }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use better artifact name, does Coder have a standard for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No standard that I know of. Do we need to name this differently? We could just upload the vsix as it is already named. I like the coder-remote-$version-$sha.vsix scheme you have, we can use that name on all uploads IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the artifact name, apparently we cannot have individual files as artifacts (you can checkout the PR artifact here as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right I forgot it forces you to zip it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
name: extension-pr-${{ github.event.pull_request.number }} | ||
path: ${{ steps.setup.outputs.packageName }} | ||
if-no-files-found: error | ||
retention-days: 7 | ||
|
||
- name: Upload artifact (main) | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: extension-main-${{ github.sha }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No standard that I know of. Do we need to name this differently? We could just upload the vsix as it is already named. I like the coder-remote-$version-$sha.vsix scheme you have, we can use that name on all uploads IMO.
fi | ||
publishGH: | ||
name: Create GitHub ${{ inputs.isPreRelease && 'Pre-' || '' }}Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sooo....I know I said I liked the idea of symmetrical releases but since we might have to duplicate pre-releases to work around VS Code's jank I wonder if we only publish previews to the marketplaces and skip them on GH to keep GH free of dupes at least. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was mistaken because of some caching issues, updating works fine from pre-release
-> release
-> pre-release
(if I'm on the pre-release channel)
packageName: | ||
required: true | ||
type: string | ||
description: "Package filename" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we derive the package name from the version and pre-release inputs? I doubt this would actually happen, but it could be weird if you are able to pass 1.1.2
and false with the package name extension-5.4.3-pre
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could yes but that means publish-extension.yaml
has to be aware of the format of the package name, right now it just takes the name as is so there's no implicit info that is deduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we derive the name, we make it impossible for the template to be used incorrectly. It seems bad that the template allows you to publish a mismatched version and package (or pre-release a non-prerelease, etc).
We could do it the other way, extract the version and whether it is a pre-release from the package. But, if we ever have to kick this off manually, it would be nicer to type in the version to publish and check a box rather than type out the full package name.
* Publish pre-release extension on every push to main * Upload VSIX to the VS Code Marketplace and Open VSX on tag push
* Publish pre-release on tag push "v*-pre"
c1ac29d
to
d075fa9
Compare
- Automatically publish a pre-release version on every merge to main with the following versioning:MAJOR.(MINOR+1).YYYYMMDDNN
. It means we can have up to 100 releases (merges to main) in a day. This is similar to how VS Code's Remote SSH does preview releases.v*-pre
tag tomain
.v*
tag tomain
.publish-extension.yaml
workflow for all publishing tasks (VS Marketplace, Open VSX, and GitHub releases), with theisPreRelease
flag controlling the behavior.Notes
VSCE_PAT
andOVSX_PAT
secrets in repo, if not set, then the pipeline fails (we can add a check here but I prefer this to be explicit).Closes #97