Skip to content

Commit

Permalink
Support publishing to Open VSX Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ono-max committed Dec 25, 2022
1 parent e423bd4 commit f772bd1
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- released

jobs:
publish:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -23,13 +23,30 @@ jobs:
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "IS_NEW_RELEASE=true" >> $GITHUB_OUTPUT
fi
- name: Publish
- run: npm install
publishToVSMarket:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Publish to Visual Studio Marketplace
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
run: |
npm install
npm install --global @vscode/vsce
vsce publish
env:
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
VSCE_PAT: ${{ secrets.VSCE_PAT }}
publishToOpenVSX:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Publish to Open VSX Registry
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
run: |
npm install --global ovsx
ovsx publish
env:
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
OVSX_PAT: ${{ secrets.OVSX_PAT }}

0 comments on commit f772bd1

Please sign in to comment.