-
Notifications
You must be signed in to change notification settings - Fork 19
64 lines (51 loc) · 1.73 KB
/
publish-to-vscode-marketplace.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
59
60
61
62
63
64
name: Publish Sirji VS Code Extension
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to release from'
required: true
default: 'main'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install VSCE
run: npm install -g vsce
- name: Install OVSX
run: npm install -g ovsx
- name: Get package.json version
id: get_version
run: echo "::set-output name=version::$(node -e 'console.log(require("./sirji/vscode-extension/package.json").version)')"
- name: Change directory and run all scripts
run: |
echo "Changing directory to sirji/vscode-extension"
cd sirji/vscode-extension
echo "Installing dependencies"
npm install
echo "Running pre publishing steps"
npm run vscode:prepublish
echo "Running pre-pack steps"
npm run prepack
echo "Packaging extension"
npm run package
- name: Publish Extension To VS Marketplace
run: |
cd sirji/vscode-extension
npm run publish -- -p ${{ secrets.VS_MARKETPLACE_PAT }}
env:
VS_MARKETPLACE_PAT: ${{ secrets.VS_MARKETPLACE_PAT }}
- name: Publish Extension To Open VSX
run: |
cd sirji/vscode-extension
ovsx publish sirji-${{ steps.get_version.outputs.version }}.vsix -p ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}
env:
OPEN_VSX_ACCESS_TOKEN: ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}