Skip to content

Commit c8cac49

Browse files
committed
ci: add publish.yml
1 parent ed72e40 commit c8cac49

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
publish-extension:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
actions: write
14+
15+
runs-on: ubuntu-slim
16+
steps:
17+
- uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 0
20+
- uses: pnpm/action-setup@v4
21+
- uses: actions/setup-node@v6
22+
with:
23+
node-version: lts/*
24+
cache: pnpm
25+
26+
- run: npx changelogithub
27+
continue-on-error: true
28+
env:
29+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
30+
31+
- run: pnpm install
32+
33+
- name: Generate .vsix file
34+
run: pnpm package
35+
36+
- name: Publish Extension
37+
run: npx vsxpub --no-dependencies --exclude ovsx
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
VSCE_PAT: ${{secrets.VSCE_PAT}}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@
6868
"lint": "eslint .",
6969
"lint:fix": "eslint . --fix",
7070
"typecheck": "tsc --noEmit",
71-
"vscode:prepublish": "npm run update && npm run build",
71+
"vscode:prepublish": "npm run build",
7272
"publish": "vsce publish --no-dependencies",
73-
"pack": "vsce package --no-dependencies"
73+
"package": "vsce package --no-dependencies",
74+
"release": "bumpp"
7475
},
7576
"nano-staged": {
7677
"*": "eslint --fix"

0 commit comments

Comments
 (0)