Skip to content

Commit 214f2fa

Browse files
committed
Support publishing to Open VSX Registry
1 parent e423bd4 commit 214f2fa

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,29 @@ on:
88
- released
99

1010
jobs:
11-
publish:
11+
setup:
1212
runs-on: ubuntu-latest
13+
outputs:
14+
is_new_release: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE }}
1315
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v3
16-
- name: Install Node.js
17-
uses: actions/setup-node@v3
18-
with:
19-
node-version: 16.x
2016
- name: Check Tag ref
2117
id: check_tag_ref
2218
run: |
2319
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2420
echo "IS_NEW_RELEASE=true" >> $GITHUB_OUTPUT
2521
fi
26-
- name: Publish
27-
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
22+
publishToVSMarket:
23+
runs-on: ubuntu-latest
24+
needs: setup
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Install Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: 16.x
32+
- name: Publish to Visual Studio Marketplace
33+
if: ${{ needs.setup.outputs.is_new_release == 'true' }}
2834
run: |
2935
npm install
3036
npm install --global @vscode/vsce
@@ -33,3 +39,23 @@ jobs:
3339
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
3440
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
3541
VSCE_PAT: ${{ secrets.VSCE_PAT }}
42+
publishToOpenVSX:
43+
runs-on: ubuntu-latest
44+
needs: setup
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v3
48+
- name: Install Node.js
49+
uses: actions/setup-node@v3
50+
with:
51+
node-version: 16.x
52+
- name: Publish to Open VSX Registry
53+
if: ${{ needs.setup.outputs.is_new_release == 'true' }}
54+
run: |
55+
npm install
56+
npm install --global ovsx
57+
ovsx publish
58+
env:
59+
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
60+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
61+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

0 commit comments

Comments
 (0)