Skip to content

Commit

Permalink
ci: publish extension
Browse files Browse the repository at this point in the history
  • Loading branch information
baicie committed Jan 3, 2024
1 parent a66e5b7 commit 9cca19c
Show file tree
Hide file tree
Showing 5 changed files with 1,219 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ jobs:
GIT_HEAD: ${{env.GIT_HEAD}}
REGISTRY: https://registry.npmjs.com/
NODE_OPTIONS: --max-old-space-size=4096

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
path: "../../packages/extension/b-reader-${{env.TAG_VERSION}}.vsix"
registryUrl: https://marketplace.visualstudio.com

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
path: "../../packages/extension/b-reader-${{env.TAG_VERSION}}.vsix"
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"github-actions.workflows.pinned.workflows": [
".github/workflows/publish-npm.yml"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"mime-types": "^2.1.35",
"oxlint": "^0.0.21",
"sass": "^1.69.5",
"semantic-release-vsce": "^5.6.4",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"turbo": "^1.11.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"scripts": {
"vscode:prepublish": "pnpm tsup",
"build": "pnpm vsce package --no-dependencies",
"build": "pnpm vsce package --no-dependencies",
"dev": "pnpm run code-debug && pnpm cross-env NODE_ENV=production pnpm tsup --watch",
"lint": "eslint src --ext ts",
"code-debug": "tsx ../../scripts/run-code.ts"
Expand All @@ -88,4 +88,4 @@
"type": "extension",
"publish": false
}
}
}
Loading

0 comments on commit 9cca19c

Please sign in to comment.