Skip to content

Commit

Permalink
ci: publish vsce to marketplace (#33)
Browse files Browse the repository at this point in the history
* ci: publish vsce to marketplace

* ci: update
  • Loading branch information
wenytang-ms authored Jan 11, 2024
1 parent 09f6480 commit ae013d6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Build visx
run: |
npm install
npx vsce package --no-dependencies
npx @vscode/vsce package --no-dependencies
- uses: actions/upload-artifact@v3
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: publish to VSCode marketplace
run-name: Publish-${{ inputs.run_id }}-${{ github.ref_name }}

on:
workflow_dispatch:
inputs:
run_id:
description: "Input the CD pipeline run ID to fetch the artifact"
required: true
default: ""

jobs:
publish-to-vscode-marketplace:
runs-on: ubuntu-latest
environment: production

steps:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: lts/*

- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}

- name: Install VSCE command
run: |
npm install @vscode/vsce -g
- name: Download release artifacts
uses: Legit-Labs/action-download-artifact@v2
with:
run_id: ${{ github.event.inputs.run_id }}
name: release
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: cd.yml
path: .

- name: release to VSCode marketplace
run: vsce publish --pat $PAT --packagePath *.vsix
env:
PAT: ${{ secrets.VSCE_PAT }}

0 comments on commit ae013d6

Please sign in to comment.