Skip to content

Commit 1d16469

Browse files
committed
chore: update GitHub Actions to latest versions
1 parent 6c58447 commit 1d16469

2 files changed

Lines changed: 87 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
latest_tag: ${{ steps.get_release_tag.outputs.latest_tag }}
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
2727

2828
- name: Resolve target VSCode version
2929
id: get_release_tag
@@ -69,22 +69,22 @@ jobs:
6969
if: needs.check_update.outputs.should_build == 'true'
7070
steps:
7171
- name: Checkout
72-
uses: actions/checkout@v5
72+
uses: actions/checkout@v6
7373

7474
# git clone --branch x.y.z --single-branch https://github.com/microsoft/vscode.git --depth=1
7575
- name: Checkout VSCode repository
76-
uses: actions/checkout@v5
76+
uses: actions/checkout@v6
7777
with:
7878
repository: microsoft/vscode
7979
ref: ${{ needs.check_update.outputs.latest_tag }}
8080
path: vscode
81-
- uses: actions/checkout@v5
81+
- uses: actions/checkout@v6
8282
with:
8383
repository: microsoft/vscode-loc
8484
path: vscode-loc
8585

8686
- name: Setup Node.js
87-
uses: actions/setup-node@v5
87+
uses: actions/setup-node@v6
8888
with:
8989
node-version-file: vscode/.nvmrc
9090

@@ -172,7 +172,7 @@ jobs:
172172
provenance: true
173173

174174
- name: Release on GitHub
175-
uses: softprops/action-gh-release@v1
175+
uses: softprops/action-gh-release@v2
176176
with:
177177
tag_name: ${{ needs.check_update.outputs.latest_tag }}
178178
draft: false

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,84 @@ This project produces a [VSCode OSS](https://github.com/microsoft/vscode) web bu
99
To get the official build, please use [this link](https://update.code.visualstudio.com/api/update/web-standalone/stable/latest), see also [@vscode/test-web](https://github.com/microsoft/vscode-test-web/blob/main/src/server/download.ts).
1010

1111
For alternative build methods, see [@github1s/vscode-web](https://github.com/conwnet/github1s/tree/master/vscode-web), [Felx-B/vscode-web](https://github.com/Felx-B/vscode-web) and [progrium/vscode-web](https://github.com/progrium/vscode-web).
12+
13+
## Usage
14+
15+
Minimal Setup.
16+
17+
```html
18+
<!DOCTYPE html>
19+
<html>
20+
<head>
21+
<meta charset="utf-8" />
22+
<meta
23+
name="viewport"
24+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
25+
/>
26+
<link rel="stylesheet" href="https://raw.esm.sh/code-oss@latest/out/vs/workbench/workbench.web.main.internal.css" />
27+
</head>
28+
<body></body>
29+
<script type="module">
30+
const CDN_PREFIX = "https://raw.esm.sh/code-oss@latest";
31+
globalThis._VSCODE_FILE_ROOT = `${CDN_PREFIX}/out/`;
32+
await import(`${CDN_PREFIX}/out/nls.messages.js`);
33+
// You can implement `workbench.js` yourself; this project provides a convenient implementation for quick setup
34+
const { default: init } = await import(`${CDN_PREFIX}/workbench.js`);
35+
init();
36+
</script>
37+
</html>
38+
```
39+
40+
Use the convenient `workbench.js` for manual setup.
41+
Most of the time, you'll want to set up a custom built-in extension.
42+
For example, [this project](https://github.com/YieldRay/vscode-web-extension-memfs) sets up a memfs so all files can be stored in the browser memory.
43+
44+
```js
45+
const CDN_PREFIX = "https://raw.esm.sh/code-oss@latest";
46+
globalThis._VSCODE_FILE_ROOT = `${CDN_PREFIX}/out/`;
47+
await import(`${CDN_PREFIX}/out/nls.messages.js`);
48+
const { default: init } = await import(`${CDN_PREFIX}/workbench.js`);
49+
const url = new URL(location.href);
50+
51+
init(document.body, {
52+
/** https://github.com/Microsoft/vscode/blob/main/product.json */
53+
productConfiguration: {
54+
nameShort: "Code - OSS",
55+
nameLong: "Code - OSS",
56+
applicationName: "code-oss",
57+
dataFolderName: ".vscode-oss",
58+
extensionsGallery: {
59+
serviceUrl: "https://open-vsx.org/vscode/gallery",
60+
itemUrl: "https://open-vsx.org/vscode/item",
61+
resourceUrlTemplate: "https://openvsxorg.blob.core.windows.net/resources/{publisher}/{name}/{version}/{path}",
62+
},
63+
extensionEnabledApiProposals: {},
64+
/** this config is required for `webWorkerExtensionHostIframe.html` to work */
65+
webEndpointUrlTemplate: CDN_PREFIX,
66+
/** this is also required */
67+
quality: "stable",
68+
},
69+
/**
70+
* optional:
71+
* this sets the default workspace folder URI
72+
*/
73+
folderUri: {
74+
scheme: "my-file-scheme",
75+
authority: url.host,
76+
query: url.search,
77+
path: url.pathname,
78+
},
79+
/**
80+
* optional:
81+
* check out this project to see how to set up built-in extensions
82+
* https://github.com/YieldRay/vscode-web-extension-memfs
83+
*/
84+
additionalBuiltinExtensions: [
85+
{
86+
scheme: url.protocol.replace(":", ""),
87+
authority: url.host,
88+
path: url.pathname + "path-to-extension",
89+
},
90+
],
91+
});
92+
```

0 commit comments

Comments
 (0)