Skip to content

Commit f772bd1

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

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- released
99

1010
jobs:
11-
publish:
11+
setup:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
@@ -23,13 +23,30 @@ jobs:
2323
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2424
echo "IS_NEW_RELEASE=true" >> $GITHUB_OUTPUT
2525
fi
26-
- name: Publish
26+
- run: npm install
27+
publishToVSMarket:
28+
runs-on: ubuntu-latest
29+
needs: setup
30+
steps:
31+
- name: Publish to Visual Studio Marketplace
2732
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
2833
run: |
29-
npm install
3034
npm install --global @vscode/vsce
3135
vsce publish
3236
env:
3337
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
3438
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
3539
VSCE_PAT: ${{ secrets.VSCE_PAT }}
40+
publishToOpenVSX:
41+
runs-on: ubuntu-latest
42+
needs: setup
43+
steps:
44+
- name: Publish to Open VSX Registry
45+
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
46+
run: |
47+
npm install --global ovsx
48+
ovsx publish
49+
env:
50+
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
51+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
52+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

0 commit comments

Comments
 (0)