forked from Tencent/cherry-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-vscode-plugin-build.yaml
More file actions
42 lines (33 loc) · 1.41 KB
/
release-vscode-plugin-build.yaml
File metadata and controls
42 lines (33 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: 'Build VscodePlugin Release'
on:
workflow_call:
jobs:
release-vscode-plugin-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
- name: Change Package Files
run: |
tmp=$(mktemp) && jq '.scripts["build"] = "yarn workspace cherry-markdown-core build" | .scripts["build:vscodePlugin"] = "yarn workspace cherry-markdown build"' package.json > "$tmp" && mv "$tmp" package.json
cd packages/cherry-markdown
tmp=$(mktemp) && jq '.name = "cherry-markdown-core"' package.json > "$tmp" && mv "$tmp" package.json
cd ../vscodePlugin
tmp=$(mktemp) && jq '.dependencies["cherry-markdown-core"] = .dependencies["cherry-markdown"] | del(.dependencies["cherry-markdown"])' package.json > "$tmp" && mv "$tmp" package.json
tmp=$(mktemp) && jq '.name = "cherry-markdown"' package.json > "$tmp" && mv "$tmp" package.json
- name: Install and Build Dependencies
run: |
yarn global add vsce
yarn --network-timeout 100000
yarn build
yarn build:vscodePlugin
- name: Publish VSCode Plugin
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
cd packages/vscodePlugin
vsce publish -p $VSCE_PAT --no-dependencies --no-yarn