From 9d82c969c5dd47cdb18f5b9c45545f03b0be79e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20S=C3=A4fsten?= Date: Thu, 29 Oct 2026 12:42:02 +0100 Subject: [PATCH] chore(release): remove the manual vsix-publish workflow The tag-driven release workflow publishes to the Marketplace itself. A dry-run dispatch (run 40866886588) proved the Azure login and publish rights. --- .github/workflows/vsix-publish.yml | 139 ----------------------------- 1 file changed, 139 deletions(-) delete mode 100644 .github/workflows/vsix-publish.yml diff --git a/.github/workflows/vsix-publish.yml b/.github/workflows/vsix-publish.yml deleted file mode 100644 index 7caf093b..00000000 --- a/.github/workflows/vsix-publish.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: Publish latest VSIX release (manual) - -on: - workflow_dispatch: - inputs: - publish_vs_marketplace: - type: boolean - default: true - description: Publish to Visual Studio Marketplace - dry_run: - type: boolean - default: false - description: Prepare the package and sign in to the Marketplace without publishing - -permissions: - contents: read - -jobs: - # ------------------------ - # Job 1: Prepare VSIX + PublishManifest - # ------------------------ - prepare: - name: Prepare VSIX package - runs-on: windows-2025-vs2026 - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Get latest release - uses: dsaltares/fetch-gh-release-asset@master - with: - regex: true - file: '.*\.vsix' - version: "latest" - target: "./" - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Output file-name for use in next job - id: latest-release - shell: pwsh - run: | - $file = (Get-ChildItem *.vsix | Select-Object -First 1).FullName - if (-not $file) { throw "No VSIX file found!" } - echo "file-name=$file" >> $env:GITHUB_OUTPUT - Write-Host "Prepared VSIX: $file" - - - name: Ensure publishManifest.json exists - shell: pwsh - run: | - if (-not (Test-Path "Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/publishManifest.json")) { - throw "publishManifest.json not found in Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022!" - } - Write-Host "Found publishManifest.json" - - - name: Copy README.md for Marketplace - shell: pwsh - run: | - $baseUrl = "https://raw.githubusercontent.com/codescene-oss/codescene-vs/main" - $content = Get-Content "README.md" -Raw - $content = $content -replace 'src="screenshots/', "src=`"$baseUrl/screenshots/" - $content = $content -replace '\]\(screenshots/', "]($baseUrl/screenshots/" - Set-Content "Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/overview.md" $content -Encoding UTF8 - - - name: Upload VSIX + publishManifest artifacts - uses: actions/upload-artifact@v4 - with: - name: vsix-package - path: | - *.vsix - Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/publishManifest.json - Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/overview.md - - # ------------------------ - # Job 2: Publish VSIX - # ------------------------ - publish: - name: Publish VSIX Extension - runs-on: windows-2025-vs2026 - needs: prepare - if: ${{ github.event.inputs.publish_vs_marketplace == 'true' }} - permissions: - contents: read - id-token: write - steps: - - name: Download VSIX artifact - uses: actions/download-artifact@v4 - with: - name: vsix-package - path: . - - - name: Debug downloaded files - shell: pwsh - run: | - Write-Host "Files downloaded from prepare job:" - Get-ChildItem -Recurse - - - name: Find VsixPublisher.exe - id: find-vsixpub - shell: pwsh - run: | - $vsix = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\18" -Recurse -Filter VsixPublisher.exe -ErrorAction SilentlyContinue | - Select-Object -First 1 -ExpandProperty FullName - if (-not $vsix) { throw "VsixPublisher.exe not found on runner." } - echo "path=$vsix" >> $env:GITHUB_OUTPUT - Write-Host "Found VsixPublisher at: $vsix" - - - name: Azure login (OIDC) - uses: azure/login@v3 - with: - client-id: ${{ secrets.AZURE_MARKETPLACE_PUBLISHING_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_MARKETPLACE_PUBLISHING_TENANT_ID }} - allow-no-subscriptions: true - - - name: Sign in to Visual Studio Marketplace - shell: pwsh - run: | - $token = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv - if (-not $token) { throw "Failed to obtain a Microsoft Entra access token for the Marketplace." } - Write-Output "::add-mask::$token" - - & "${{ steps.find-vsixpub.outputs.path }}" login ` - -personalAccessToken "$token" ` - -publisherName "CodeScene" - if ($LASTEXITCODE -ne 0) { throw "VsixPublisher login failed with exit code $LASTEXITCODE." } - - - name: Publish to Visual Studio Marketplace - if: ${{ github.event.inputs.dry_run != 'true' }} - shell: pwsh - run: | - $file = (Get-ChildItem *.vsix | Select-Object -First 1).FullName - $manifest = (Get-ChildItem -Recurse -Filter publishManifest.json | Select-Object -First 1).FullName - - if (-not $manifest) { throw "publishManifest.json not found in downloaded artifacts!" } - - Write-Host "Publishing VSIX: $file with manifest: $manifest" - - & "${{ steps.find-vsixpub.outputs.path }}" publish ` - -payload "$file" ` - -publishManifest "$manifest"