From 143e572646ebf6be599703566f5337f53abfa3ad Mon Sep 17 00:00:00 2001 From: wenytang-ms Date: Wed, 10 Jan 2024 15:48:06 +0800 Subject: [PATCH 1/2] ci: publish vsce to marketplace --- .github/workflows/publish.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..2fd435d --- /dev/null +++ b/.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 + + - 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 }} From b9863c82f24f51f52ac96bca5de0a62bf20d8bd9 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 11 Jan 2024 13:04:31 +0800 Subject: [PATCH 2/2] ci: update --- .github/workflows/cd.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 458236d..16d9f81 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2fd435d..99f0cb0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,7 +27,7 @@ jobs: - name: Install VSCE command run: | - npm install vsce -g + npm install @vscode/vsce -g - name: Download release artifacts uses: Legit-Labs/action-download-artifact@v2