Skip to content

Publish to VS Marketplace #7

Publish to VS Marketplace

Publish to VS Marketplace #7

Workflow file for this run

name: Publish to VS Marketplace
on:
workflow_dispatch:
jobs:
publish:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 1. Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GH_SECRET }}
workflow: release_build_and_deploy.yml
workflow_conclusion: success
- name: 2. Parse Artifact Manifest
id: artifact_manifest
uses: ActionsTools/read-json-action@main
with:
file_path: ./artifact/CodingWithCalvin.WebcamStudio.info
- name: 3. Create Tag & Release
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ./artifact/CodingWithCalvin.WebcamStudio.vsix
generateReleaseNotes: true
makeLatest: true
token: ${{ secrets.GH_SECRET }}
commit: ${{ steps.artifact_manifest.outputs.sha }}
tag: ${{ steps.artifact_manifest.outputs.version }}
- name: 4. Publish Release to OpenVSIX Gallery
if: success()
shell: pwsh
run: |
$repoUrl = "${{ github.server_url }}/${{ github.repository }}"
$issuesUrl = "${repoUrl}/issues"
$readmeUrl = "https://raw.githubusercontent.com/${{ github.repository }}/main/README.md"
$uploadUrl = "https://www.vsixgallery.com/api/upload?repo=${repoUrl}&issuetracker=${issuesUrl}&readmeUrl=${readmeUrl}"
$webclient = New-Object System.Net.WebClient
$webclient.UploadFile($uploadUrl, "./artifact/CodingWithCalvin.WebcamStudio.vsix") | Out-Null