Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish vsce to marketplace #33

Merged
merged 2 commits into from Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
@@ -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 vsce -g
wenytang-ms marked this conversation as resolved.
Show resolved Hide resolved

- 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 }}