Skip to content

Commit

Permalink
[ci] add a job to publish the extension to the Visual Studio Marketplace
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
  • Loading branch information
marcdumais-work committed Feb 16, 2024
1 parent 37fd531 commit 27b4f7c
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ jobs:
- name: Run format check
run: yarn format:check

publish:
name: Publish extension to openvsx.org
publish-oxsv:
# https://open-vsx.org/
name: Publish extension to public Open VSX Registry
runs-on: ${{ matrix.os }}
needs:
- build-test
Expand Down Expand Up @@ -90,4 +91,35 @@ jobs:
# have ovsx consume the PAT from environment - if it's not handled explicitly
# in the workflow, less risk to leak it
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}


publish-vs-marketplace:
# https://marketplace.visualstudio.com/
name: Publish extension to Visual Studio Marketplace
runs-on: ${{ matrix.os }}
needs:
- build-test
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16]
# Only execute when the trigger was a tag (new release)
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: extension
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-scripts
- name: Publish extension
run: |
ls -al vscode-trace-server-*.vsix
npx vsce publish -i vscode-trace-server-*.vsix --skip-duplicate
env:
# have vsce consume the PAT from environment - if it's not handled explicitly
# in the workflow, less risk to leak it
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}

0 comments on commit 27b4f7c

Please sign in to comment.