-
Notifications
You must be signed in to change notification settings - Fork 73
52 lines (51 loc) · 1.67 KB
/
publish-extension.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
on:
workflow_dispatch:
inputs:
preRelease:
description: "Make this a pre-release ?"
required: true
type: boolean
default: true
marketplace:
description: "On which market place should we publish ?"
required: true
type: choice
default: 'both'
options:
- vscode
- openvsx
- both
jobs:
publish-extension:
runs-on: ubuntu-latest
if: ${{success() && (startsWith(github.ref, 'refs/tags/') || inputs.preRelease)}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Pre publish phase
run: |
cd client
yarn run package
- name: Publish to Open VSX Registry
if: ${{inputs.marketplace == 'openvsx' || inputs.marketplace == 'both'}}
uses: HaaLeo/[email protected]
id: publishToOpenVSX
with:
pat: ${{ secrets.OVSX_PAT }}
packagePath: ./client/
yarn: true
preRelease: ${{ inputs.preRelease }}
- name: Publish to Visual Studio Marketplace
if: ${{inputs.marketplace == 'vscode' || inputs.marketplace == 'both'}}
uses: HaaLeo/[email protected]
with:
pat: ${{ secrets.VSCE_PAT }}
packagePath: ./client/
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
yarn: true
preRelease: ${{ inputs.preRelease }}