-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.24 KB
/
release.yml
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
43
name: Publish Release
on:
release:
types: [published]
env:
VSIX_NAME: vscode-pyright.vsix
NODE_VERSION: '16' # Shipped with VS Code.
jobs:
publish_extension:
if: ${{ github.repository == 'khulnasoft-lab/pyright' }}
runs-on: ubuntu-latest
name: Publish extension to marketplace
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
- name: Download VSIX
uses: i3h/download-release-asset@v1
with:
owner: microsoft
repo: pyright
tag: ${{ github.event.release.tag_name }}
file: ${{ env.VSIX_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension
- name: Install VSCE
run: |
npm install -g "vsce@$(jq -r '.dependencies.vsce.version' < packages/vscode-pyright/package-lock.json)"
npx vsce --version
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token
- name: Publish VSIX
run: npx vsce publish --packagePath ${{ env.VSIX_NAME }} --pat ${{ secrets.VSCE_TOKEN }} --noVerify