Skip to content

Commit

Permalink
optionaly try to publish to vscode marketplace
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Apr 27, 2023
1 parent aff8605 commit 9aafc37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/c-cpp.yml
Expand Up @@ -49,4 +49,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VSCE_PAT: $${{ secrets.VSCE_PAT }}
5 changes: 3 additions & 2 deletions scripts/bump.mjs
Expand Up @@ -77,7 +77,7 @@ async function userBump() {

async function cloudPublish() {
// check secrets
const missingEnvs = ["GITHUB_TOKEN", "NODE_AUTH_TOKEN", "VSCE_PAT"].filter(
const missingEnvs = ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"].filter(
k => process.env[k] === undefined
)
if (missingEnvs.length) fail(`${missingEnvs.join(", ")} not set`)
Expand Down Expand Up @@ -138,7 +138,8 @@ async function cloudPublish() {

await $`make vscode-pkg`
await $`gh release create ${vCurrVer} vscode/devicescript.vsix`
await $`npx vsce publish --packagePath vscode/devicescript.vsix --pat $VSCE_PAT`
if (process.env.VSCE_PAT)
await $`npx vsce publish --packagePath vscode/devicescript.vsix`
}

if (argv.cloud) {
Expand Down

0 comments on commit 9aafc37

Please sign in to comment.