Skip to content

Commit 61f2918

Browse files
committed
refactor: vsce publishing logic
1 parent 7152b20 commit 61f2918

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

scripts/release.mts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,19 @@ ${changelogData}`;
9898
process.exit(0);
9999
}
100100

101+
if (process.env.VSCE_TOKEN) {
102+
// Publish to VSCE
103+
try {
104+
await $({
105+
stdio: 'inherit',
106+
preferLocal: true
107+
})`vsce publish -p ${process.env.VSCE_TOKEN} --no-dependencies`;
108+
} catch (err) {
109+
consola.error(err);
110+
process.exit(0);
111+
}
112+
}
113+
101114
const git = simpleGit({
102115
config: [
103116
'credential.https://github.com/.helper="! f() { echo username=x-access-token; echo password=$GITHUB_TOKEN; };f"'
@@ -147,17 +160,7 @@ ${changelogData}`;
147160
}
148161
}
149162

150-
if (process.env.VSCE_TOKEN) {
151-
// Publish to VSCE
152-
try {
153-
await $({
154-
stdio: 'inherit',
155-
preferLocal: true
156-
})`vsce publish -p ${process.env.VSCE_TOKEN} --no-dependencies`;
157-
} catch (err) {
158-
consola.error(err);
159-
}
160-
}
163+
161164

162165
if (process.env.OVSX_TOKEN) {
163166
// Publish to OVSX

0 commit comments

Comments
 (0)