Skip to content

ci: publish the VS Code extension from a release tag - #20

Merged
AlexMultiAgent merged 1 commit into
mainfrom
ci/publish-workflow
Nov 23, 2026
Merged

AlexMultiAgent merged 1 commit into
mainfrom
ci/publish-workflow

Conversation

@AlexMultiAgent

Copy link
Copy Markdown
Owner

Follows the QuotaDeck pattern: the VS Marketplace step needed an Azure DevOps PAT that is not stored on this machine, so the last step of every release had to be run by hand.

What it does

.github/workflows/publish.yml fires on a v* tag push:

  1. Re-runs the unit tests (npm test) and the real-Pandoc E2E exports (npm run test:e2e)
  2. Builds the VSIX (npm run package)
  3. Publishes it through Marketplace Trusted Publishing — npx @vscode/vsce@4.1.1 publish --oidc, no PAT stored anywhere — with --skip-duplicate so a re-run is idempotent
  4. Attaches the same VSIX to a GitHub Release, with the release notes taken from the README's ### Changes in <version> section

Permissions follow the Scorecard-minimal layout: permissions: contents: read at the workflow level, contents: write + id-token: write on the job. The OIDC token is what Trusted Publishing mints.

Two gates

  • The tag must equal VSC-plugin-MD2Docx-Converter/package.json's version
  • dify-plugin-MD2Docx/manifest.yaml must carry that same version (version: and meta.version:)

The two products share one version line, so a tag that moved only one of them would publish a VSIX whose Dify plugin counterpart does not exist yet.

One thing outside the repository

The publisher's Trusted Publishing policy on the VS Marketplace has to name this repository and this workflow file. Until that is configured, the publish step will fail — everything up to it still works.

The Dify plugin release is unchanged: it still goes through the Marketplace PR flow with a manually built .difypkg.

CLAUDE.md is updated to describe the new path instead of the manual PAT flow.

The Marketplace step needed an Azure DevOps PAT that is not stored on
this machine, so the last step of every release had to be run by hand.

Add .github/workflows/publish.yml on the QuotaDeck model: a v* tag push
re-runs the unit tests and the real-Pandoc E2E exports, builds the VSIX,
publishes it through Marketplace Trusted Publishing (--oidc, no PAT) and
attaches the same VSIX to a GitHub Release. The publisher's Trusted
Publishing policy has to name this repository and this workflow file.

Two gates protect the shared version line: the tag must equal the
extension version, and the Dify plugin's manifest.yaml must carry that
same version, so a tag that moved only one of the two products cannot
publish a VSIX whose plugin counterpart does not exist yet.

Release notes come from the README's '### Changes in <version>' section,
which is where this repository keeps its changelog.
@AlexMultiAgent
AlexMultiAgent merged commit 86be21f into main Nov 23, 2026
11 checks passed
@AlexMultiAgent
AlexMultiAgent deleted the ci/publish-workflow branch November 23, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant