Skip to content

Commit 718a1e0

Browse files
Merge branch 'master' into add-supabase-postgrestools
2 parents a9cec0e + 0e07c41 commit 718a1e0

File tree

13 files changed

+636
-250
lines changed

13 files changed

+636
-250
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Publish extension
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
extension:
6+
description: Extension JSON object
7+
required: true
8+
type: string
9+
publishContext:
10+
description: Publish context JSON object
11+
required: true
12+
type: string
13+
skipPublish:
14+
description: Skip publishing to Open VSX, only build extensions
15+
type: boolean
16+
required: false
17+
default: false
18+
force:
19+
description: Force publish to Open VSX, even if version is already published
20+
type: boolean
21+
required: false
22+
default: false
23+
jobs:
24+
download_release:
25+
name: Download latest release
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
env:
30+
DO_DOWNLOAD: ${{ fromJSON(inputs.publishContext).files != null }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
if: ${{ env.DO_DOWNLOAD == 'true' }}
34+
- uses: actions/[email protected]
35+
if: ${{ env.DO_DOWNLOAD == 'true' }}
36+
with:
37+
node-version: "20.x"
38+
- run: npm install
39+
if: ${{ env.DO_DOWNLOAD == 'true' }}
40+
- run: npm i -g @vscode/vsce pnpm
41+
if: ${{ env.DO_DOWNLOAD == 'true' }}
42+
- id: download_extension
43+
uses: actions/github-script@v7
44+
if: ${{ env.DO_DOWNLOAD == 'true' }}
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
EXTENSION: ${{ inputs.extension }}
48+
PUBLISH_CONTEXT: ${{ inputs.publishContext }}
49+
with:
50+
script: |
51+
const script = require('./scripts/download-extension.js');
52+
await script();
53+
build_extension:
54+
name: Build Extension
55+
runs-on: ubuntu-latest
56+
needs: download_release
57+
permissions:
58+
actions: none
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: actions/[email protected]
62+
with:
63+
node-version: "20.x"
64+
- uses: oven-sh/setup-bun@v2
65+
with:
66+
bun-version: latest
67+
- name: Set up pyenv
68+
uses: "gabrielfalcao/pyenv-action@32ef4d2c861170ce17ded56d10329d83f4c8f797"
69+
with:
70+
command: python --version
71+
- name: Set default global version
72+
run: |
73+
pyenv install 3.8
74+
pyenv global 3.8
75+
- uses: actions/setup-java@v4
76+
with:
77+
distribution: "microsoft"
78+
java-version: "21"
79+
- name: Install dependencies for native modules
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install libpango1.0-dev libgif-dev
83+
- run: npm install
84+
- run: npm i -g @vscode/vsce pnpm
85+
- uses: actions/download-artifact@v4
86+
with:
87+
path: /tmp
88+
- id: build_extension
89+
name: Build extension
90+
uses: actions/github-script@v7
91+
env:
92+
FORCE: ${{ inputs.force }}
93+
SKIP_PUBLISH: ${{ inputs.skipPublish }}
94+
EXTENSION: ${{ inputs.extension }}
95+
PUBLISH_CONTEXT: ${{inputs.publishContext}}
96+
with:
97+
script: |
98+
const extension = JSON.parse(process.env.EXTENSION);
99+
const publishContext = JSON.parse(process.env.PUBLISH_CONTEXT);
100+
const buildScript = require('./scripts/build-extension.js');
101+
const extensionFiles = await buildScript(extension, publishContext);
102+
const uploadScript = require('./scripts/upload-artifacts.js');
103+
await uploadScript(extensionFiles);
104+
core.setOutput("extensionFiles", JSON.stringify(extensionFiles));
105+
outputs:
106+
extensionFiles: ${{ steps.build_extension.outputs.extensionFiles }}
107+
publish_extension:
108+
name: Publish Extension
109+
runs-on: ubuntu-latest
110+
if: ${{ inputs.skipPublish != 'true' }}
111+
needs: build_extension
112+
permissions:
113+
actions: none
114+
steps:
115+
- uses: actions/checkout@v4
116+
- uses: actions/[email protected]
117+
with:
118+
node-version: "20.x"
119+
- run: npm install
120+
- run: npm i -g @vscode/vsce pnpm
121+
- uses: actions/download-artifact@v4
122+
with:
123+
path: /tmp
124+
- uses: actions/github-script@v7
125+
env:
126+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
127+
EXTENSION_ID: ${{ fromJson(inputs.extension).id }}
128+
EXTENSION_FILES: ${{needs.build_extension.outputs.extensionFiles}}
129+
with:
130+
script: |
131+
const extensionId = process.env.EXTENSION_ID;
132+
const extensionFiles = JSON.parse(process.env.EXTENSION_FILES);
133+
const script = require('./scripts/publish-extension.js');
134+
await script(extensionId, extensionFiles);

.github/workflows/publish-extensions.yml

Lines changed: 55 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,67 +29,75 @@ jobs:
2929
FORCE: ${{ github.event.inputs.forcefullyPublish }}
3030
name: Publish Extensions
3131
runs-on: ubuntu-latest
32+
permissions:
33+
actions: write
34+
contents: read
3235
steps:
3336
- uses: actions/checkout@v4
3437
- uses: actions/[email protected]
3538
with:
3639
node-version: "20.x"
37-
- uses: oven-sh/setup-bun@v2
38-
with:
39-
bun-version: latest
40-
- name: Set up pyenv
41-
uses: "gabrielfalcao/pyenv-action@32ef4d2c861170ce17ded56d10329d83f4c8f797"
42-
with:
43-
command: python --version
44-
- name: Set default global version
45-
run: |
46-
pyenv install 3.8
47-
pyenv global 3.8
48-
- uses: actions/setup-java@v4
49-
with:
50-
distribution: "microsoft"
51-
java-version: "17"
52-
- name: Install dependencies for native modules
53-
run: |
54-
sudo apt-get update
55-
sudo apt-get install libpango1.0-dev libgif-dev
5640
- run: npm install
5741
- run: npm i -g @vscode/vsce pnpm
58-
- run: node publish-extensions
42+
- uses: actions/github-script@v7
5943
env:
60-
OVSX_PAT: ${{ secrets.OVSX_PAT }}
6144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
- name: Report results
63-
run: bun run ./report-extensions.ts
64-
- uses: actions/upload-artifact@v4
65-
if: always()
45+
REPOSITORY: ${{ github.repository }}
6646
with:
67-
name: report
68-
path: |
69-
/tmp/stat.json
70-
/tmp/result.md
71-
- uses: actions/upload-artifact@v4
72-
if: always()
73-
with:
74-
name: artifacts
75-
path: |
76-
/tmp/artifacts/*.vsix
77-
- name: Upload job summary
78-
if: always()
79-
run: cat /tmp/result.md >> $GITHUB_STEP_SUMMARY
80-
- name: Get previous job's status
81-
id: lastrun
82-
uses: filiptronicek/get-last-job-status@main
83-
- name: Slack Notification
84-
if: ${{ !github.event.inputs.extensions && ((success() && steps.lastrun.outputs.status == 'failed') || failure()) }}
85-
uses: rtCamp/action-slack-notify@v2
86-
env:
87-
SLACK_WEBHOOK: ${{ secrets.GITPOD_SLACK_WEBHOOK }}
88-
SLACK_COLOR: ${{ job.status }}
47+
script: |
48+
const script = require('./scripts/publish-extensions.js');
49+
await script(async (extension, context) => {
50+
const [owner, repo] = process.env.REPOSITORY.split("/");
51+
await github.request("POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", {
52+
owner,
53+
repo,
54+
workflow_id: "publish-extension.yml",
55+
ref: "master",
56+
inputs: {
57+
extension: JSON.stringify(extension),
58+
publishContext: JSON.stringify(context),
59+
force: process.env.FORCE,
60+
skipPublish: process.env.SKIP_PUBLISH,
61+
},
62+
headers: {
63+
"X-GitHub-Api-Version": "2022-11-28",
64+
},
65+
});
66+
});
67+
# TODO fix reporting
68+
# - name: Report results
69+
# run: bun run ./report-extensions.ts
70+
# - uses: actions/upload-artifact@v4
71+
# if: always()
72+
# with:
73+
# name: report
74+
# path: |
75+
# /tmp/stat.json
76+
# /tmp/result.md
77+
# - uses: actions/upload-artifact@v4
78+
# if: always()
79+
# with:
80+
# name: artifacts
81+
# path: |
82+
# /tmp/artifacts/*.vsix
83+
# - name: Upload job summary
84+
# if: always()
85+
# run: cat /tmp/result.md >> $GITHUB_STEP_SUMMARY
86+
# - name: Get previous job's status
87+
# id: lastrun
88+
# uses: filiptronicek/get-last-job-status@main
89+
# - name: Slack Notification
90+
# if: ${{ !github.event.inputs.extensions && ((success() && steps.lastrun.outputs.status == 'failed') || failure()) }}
91+
# uses: rtCamp/action-slack-notify@v2
92+
# env:
93+
# SLACK_WEBHOOK: ${{ secrets.GITPOD_SLACK_WEBHOOK }}
94+
# SLACK_COLOR: ${{ job.status }}
8995
check_parity:
9096
name: Check MS parity
9197
runs-on: ubuntu-latest
9298
needs: publish_extensions
99+
permissions:
100+
actions: none
93101
if: ${{ !github.event.inputs.extensions }} # only run on full runs
94102
steps:
95103
- uses: actions/checkout@v4

.github/workflows/validate-pr.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ jobs:
3030
run: |
3131
pyenv install 3.8
3232
pyenv global 3.8
33-
- run: EXTENSIONS=$(node diff-extensions) node publish-extensions
33+
- run: echo "EXTENSIONS=$(node diff-extensions)" >> $GITHUB_ENV
34+
- uses: actions/github-script@v7
3435
env:
3536
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
REPOSITORY: ${{ github.repository }}
38+
with:
39+
script: |
40+
const script = require('./scripts/publish-extensions.js');
41+
await script({github});
3642
- name: Report results
3743
run: bun run ./report-extensions.ts
3844
- uses: actions/upload-artifact@v4

extension-control/extensions.json

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,54 @@
33
"kyntrack.log-matrix",
44
"bipro.bipro-dev",
55
"Equinusocio.vsc-material-theme",
6-
"Equinusocio.vsc-material-theme-icons"
6+
"Equinusocio.vsc-material-theme-icons",
7+
"498.pythonformat",
8+
"prada555.Theme-Acai-ported-1.0.0",
9+
"prada555.Theme-Active4D-ported-1.0.0",
10+
"AllenBarry.Solid"
711
],
812
"search": [
913
{
1014
"query": "github",
11-
"preferredResults": ["github.vscode-pull-request-github", "github.github-vscode-theme"]
15+
"preferredResults": [
16+
"github.vscode-pull-request-github",
17+
"github.github-vscode-theme"
18+
]
1219
},
1320
{
1421
"query": "java",
15-
"preferredResults": ["vscjava.vscode-java-pack"]
22+
"preferredResults": [
23+
"vscjava.vscode-java-pack"
24+
]
1625
},
1726
{
1827
"query": "java extension pack",
19-
"preferredResults": ["vscjava.vscode-java-pack"]
28+
"preferredResults": [
29+
"vscjava.vscode-java-pack"
30+
]
2031
},
2132
{
2233
"query": "azure",
23-
"preferredResults": ["ms-azuretools.vscode-azureappservice"]
34+
"preferredResults": [
35+
"ms-azuretools.vscode-azureappservice"
36+
]
2437
},
2538
{
2639
"query": "codegpt",
27-
"preferredResults": ["DanielSanMedium.dscodegpt"]
40+
"preferredResults": [
41+
"DanielSanMedium.dscodegpt"
42+
]
2843
}
2944
],
3045
"deprecated": {
46+
"andrewhertog.codex-editor-extension": true,
47+
"dieghernan.oveflow-theme": {
48+
"disallowInstall": true,
49+
"extension": {
50+
"id": "dieghernan.overflow-theme",
51+
"displayName": "Overflow Theme"
52+
}
53+
},
3154
"decodetalkers.neocmake-lsp-vscode": {
3255
"disallowInstall": false,
3356
"extension": {
@@ -140,10 +163,16 @@
140163
}
141164
},
142165
"CoenraadS.bracket-pair-colorizer-2": {
143-
"settings": ["editor.bracketPairColorization.enabled", "editor.guides.bracketPairs"]
166+
"settings": [
167+
"editor.bracketPairColorization.enabled",
168+
"editor.guides.bracketPairs"
169+
]
144170
},
145171
"CoenraadS.bracket-pair-colorizer": {
146-
"settings": ["editor.bracketPairColorization.enabled", "editor.guides.bracketPairs"]
172+
"settings": [
173+
"editor.bracketPairColorization.enabled",
174+
"editor.guides.bracketPairs"
175+
]
147176
},
148177
"idleberg.innosetup": {
149178
"disallowInstall": true,
@@ -445,7 +474,23 @@
445474
"id": "redhat.vscode-openshift-connector",
446475
"displayName": "OpenShift Toolkit"
447476
}
448-
}
477+
},
478+
"SridharMocherla.bazel-kotlin-vscode-extension": {
479+
"disallowInstall": true,
480+
"extension": {
481+
"id": "Brex.bazel-kotlin",
482+
"displayName": "Bazel Kotlin"
483+
}
484+
},
485+
"DrMerfy.overtype": true,
486+
"jroesch.lean": true,
487+
"moalamri.inline-fold": true,
488+
"MS-CEINTL.vscode-language-pack-bg": true,
489+
"MS-CEINTL.vscode-language-pack-en-GB": true,
490+
"MS-CEINTL.vscode-language-pack-hu": true,
491+
"MS-CEINTL.vscode-language-pack-id": true,
492+
"MS-CEINTL.vscode-language-pack-nl": true,
493+
"MS-CEINTL.vscode-language-pack-uk": true
449494
},
450495
"migrateToPreRelease": {
451496
"julialang.language-julia-insider": {
@@ -462,4 +507,4 @@
462507
}
463508
},
464509
"extensionsEnabledWithPreRelease": []
465-
}
510+
}

extension-control/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const existsOnOpenVSX = async (id: string) => {
4848
return false;
4949
};
5050

51-
const latestData = await fetch("https://az764295.vo.msecnd.net/extensions/marketplace.json");
51+
const latestData = await fetch("https://main.vscode-cdn.net/extensions/marketplace.json");
5252
const latestJson = (await latestData.json()) as IStringDictionary<IRawExtensionsControlManifest>;
5353

5454
const localFile = Bun.file(path.resolve(__dirname, "./extensions.json"));

0 commit comments

Comments
 (0)