Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

permissions:
contents: write # create the GitHub Release + upload the .vsix
id-token: write # Open VSX trusted publishing (OIDC)

concurrency:
group: release-${{ github.ref }}
Expand Down Expand Up @@ -52,16 +53,21 @@ jobs:
- name: Package
run: npx --yes @vscode/vsce package

# Cursor and Kiro install from Open VSX - publish the identical .vsix there.
- name: Publish to Open VSX (trusted publishing)
run: npx --yes ovsx@^1.2 publish --trusted-publishing ./*.vsix

- name: Publish to VS Code Marketplace
if: env.VSCE_PAT != ''
run: npx --yes @vscode/vsce publish --packagePath ./*.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

# Cursor and Kiro install from Open VSX - publish the identical .vsix there.
- name: Publish to Open VSX
run: npx --yes ovsx publish ./*.vsix
- name: Marketplace skipped
if: env.VSCE_PAT == ''
run: echo "::notice::VSCE_PAT secret not set, skipped the VS Code Marketplace publish."
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Create GitHub Release with .vsix asset
run: gh release create "$GITHUB_REF_NAME" ./*.vsix --generate-notes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To add a fifth variant: add a palette object, run `npm run build`, add the theme

CI (`.github/workflows/ci.yml`) runs on every push and PR: regenerates the themes, fails if `themes/*.json` were hand-edited, runs the contrast audit, and does a dry-run package.

Pushing a `v*` tag (for example `git tag v2.1.0 && git push origin v2.1.0`) triggers `.github/workflows/release.yml`, which publishes the same `.vsix` to **both** the VS Code Marketplace and **Open VSX** (where Cursor and Kiro install from), and attaches it to a GitHub Release. It needs two repo secrets: `VSCE_PAT` (Azure DevOps, Marketplace Manage scope) and `OVSX_PAT` (open-vsx.org token; create the `I4cTime` namespace once with `npx ovsx create-namespace`).
Pushing a `v*` tag (for example `git tag v2.1.0 && git push origin v2.1.0`) triggers `.github/workflows/release.yml`, which publishes the same `.vsix` to **both** the VS Code Marketplace and **Open VSX** (where Cursor and Kiro install from), and attaches it to a GitHub Release. Open VSX uses trusted publishing (the workflow is registered as a trusted publisher on open-vsx.org, no token). The Marketplace step needs the `VSCE_PAT` repo secret (Azure DevOps, Marketplace Manage scope) and is skipped until it exists.

## License

Expand Down
Loading