-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.66 KB
/
build-vsix-marketplaces.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Build and publish VSIX bundle of the VScode extension to marketplaces
name: Publish VSIX to Marketplaces
on:
workflow_call:
inputs:
git_ref:
required: true
type: string
version:
required: true
type: string
secrets:
VSCE_PAT:
description: "Token for publishing to the VSCode Marketplace"
required: true
OPEN_VSX_PAT:
description: "Token for publishing to the Open VSX Registry"
required: true
env:
EXTENSION_DIRECTORY: ./vscode-ext
jobs:
publish-vsix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
- name: Install Node.js
uses: actions/setup-node@v4
- name: Install NPM dependencies
working-directory: ${{ env.EXTENSION_DIRECTORY }}
run: npm install
- name: Package the extension
working-directory: ${{ env.EXTENSION_DIRECTORY }}
run: npm run package -- --out caesar-${{ inputs.version }}.vsix
- name: Publish the extension (Visual Studio Marketplace)
uses: HaaLeo/publish-vscode-extension@v1
with:
registryUrl: https://marketplace.visualstudio.com
pat: ${{ secrets.VSCE_PAT }}
extensionFile: ${{env.EXTENSION_DIRECTORY}}/caesar-${{ inputs.version }}.vsix
- name: Publish the extension (Open VSX Registry)
uses: HaaLeo/publish-vscode-extension@v1
with:
registryUrl: https://open-vsx.org
pat: ${{ secrets.OPEN_VSX_PAT }}
extensionFile: ${{env.EXTENSION_DIRECTORY}}/caesar-${{ inputs.version }}.vsix