-
Notifications
You must be signed in to change notification settings - Fork 14
61 lines (54 loc) · 1.87 KB
/
publish-marketplace-vsix.yml
File metadata and controls
61 lines (54 loc) · 1.87 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Publish SI Extension to VSCode Marketplace and OpenVSX
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g., v0.1.0)'
required: true
isPreRelease:
description: Indicates if the release is a pre-release
required: true
type: boolean
default: false
vscode:
description: Publish to VSCode marketplace
type: boolean
required: true
default: false
openVSX:
description: Publish to OpenVSX marketplace
type: boolean
required: true
default: false
jobs:
publish:
name: Publish SI extension to marketplaces
runs-on: ubuntu-latest
steps:
- name: Download VSIX from GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release download "${{ inputs.tag }}" --repo "${{ github.repository }}" --pattern "*.vsix"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: |
npm install -g @vscode/vsce
npm install -g ovsx
- name: Get VSIX info
id: vsix
run: |
file=$(ls streaming-integrator-*.vsix)
echo "vsixName=$file" >> $GITHUB_OUTPUT
if [ "${{ inputs.isPreRelease }}" == "true" ]; then
echo "releaseMode=--pre-release" >> $GITHUB_OUTPUT
else
echo "releaseMode=" >> $GITHUB_OUTPUT
fi
- name: Publish to VSCode marketplace
if: ${{ inputs.vscode }}
run: vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath ${{ steps.vsix.outputs.vsixName }} ${{ steps.vsix.outputs.releaseMode }}
- name: Publish to OpenVSX marketplace
if: ${{ inputs.openVSX && !inputs.isPreRelease }}
run: ovsx publish -p ${{ secrets.OPENVSX_TOKEN }} --packagePath ${{ steps.vsix.outputs.vsixName }}